Added features for gamemode saving(some are NYI)

Implemented the basis for per-world and per-gamemode saving/loading.
Some features that use this, such as player commands, are either not yet
implemented, or are broken. These will be updated and tested on the next
commit.