General code cleanups and memory leak fixes
- Overall includes cleanup
- Use std::make_pair
- Make some functions const
- Manage CharacterData using std::unique_ptr
Fixes many memory leaks, but also made it clear that we're very often loading all the character data only to immediately throw it away again, even when most of the time all we really need is the database ID or the name.