Terrain generator

Added a bunch of optimizations and restructuring to the map generation. Caves are hard, so that will be a problem solved another day.
That's difficult. Maybe we'll just flag random chunks as being "all ore" if the whole chunk is below the heightmap. Yeah. That. That's easy.