Some bug fixes
MySQL

Realize that by the nature of the request this code is a monster, as it uses
a database in a way that it really shouldn't be used.  Ideally this is just
a phase to hold a slightly faster save system pending a true mySQL implementation
being created, something that accounts for changes in live time rather than caching them in memory and writing them all to database at regular intervals.
I acknowledge the frakenstein that this is.