Staged changes for switch to new JSON system. Cleaned up other code.
Massive cleanups. Split TerrainSet into TerrainInfo and TerrainResources for better performance.