Crew members are not authorized to pronounce anyone dead in flight.
Occasionally someone will die inflight and no one knows until the airplane lands. I had a fellow expire on a 30 minute flight one time. I remember seeing him reading a book until shortly before landing. He put the book away, brought his seat up, we landed and taxied to the gate. He appeared to be asleep -- when I tried to wake him up to deplane, it was obvious he was deceased. We did CPR
on him, but it was, of course, to no avail.
On a long flight, a medical emergency would be declared and the airplane would divert.
Under no set of circumstances would I ever have declared someone dead and dumped him in a closet or a bathroom. I am neither authorized or am I qualified to prounounce a person dead. If I had a doctor on board who was qualified to prnounce someone dead, I would simply have put that person in a seat, covered him with a blanket, set him up with an oxygen bottle and faked it. A medical emergency would be declared and the person removed at the first possible landing place.
It takes a while for a dead body to develop and odor. Also, the air that's in the plane is the air that's in the plane. The same air circulates all over the plane so there would be no health benefit to anyone to simply dump someone in a bathroom.
The exception would be someone who had committed suicide by slitting his wrists in the bathroom. This happened on an old National Airlines flight one time. The blood would be an obvious biohazard and the person would remain where he was.