Core/DBLayer: multiple fixes

*Fixed .list item command crash
*Fixed Mail system issues
*Fixed petitions crashes
*Fixed faction/race change
*Fixed WP loading query
Merge pull request #799 from roc13x/master

Core/DBLayer: multiple fixes