Prevent falling through floor when leaving bed

Without this change, leaving a bed which is on a floor one node high
makes you fall through the floor. Additionally, sometimes (presumably
due to network lag) you would still be in the bed, which you could no
longer see, leaving you no option but to log out.
A couple of fixes...

1. save spawn position when the player gets in the bed, not when
everybody in the world is in bed
2. restore position to where the player got into bed from (so
never into a wall as it could do before)
A load more fixes
Fix shutdown misbehaviour, and support health mod
Prevent server crash if sleeping player no longer exists
Seems like that is still needed to prevent occasional falling through floor
added translation function and make reciepes shown in unif.inventory
Create template.txt
german translation