Various tweaks for speeding up the game

Such as:
 * caching frequently queries

Please keep this branch in sync with master. The final goal is < 100 ms load time for every page in the game.