BUGFIX: NPCs should not be freed twice (they're already freed by their CSTLMap container).
Various tweaks to fix compilation pre-C++11 & ensure threads are shutdown correctly before the servers exit.