[12771] Rewrite rest management.

Fix Rest when logged in not working in some case.
Also fix rest bonus according to wowwiki.

This need to be backported in all core.
Thank to @TheTrueAnimal for pointing.
Fix cmangos/issues#494
[12772] Fix crash when resurect a corpse.

Special thanks to antiroot for his help
Fix cmangos/issues#478