Fix NOPCH and possible crash.

More info -> http://cmangos.net/thread-6807.html
Some fix pointed in github comment.
Also improve loot creation for mail and some special cases.
Continue to clean the code and fix logout loot release.
I need to find the correct way to handle special case when lootmaster logout while a loot is available.