Fixed formula for dwellings value.
Various optimizations based on RMG profiling.
Reduced usage of TerrainViewPattern constructor for faster map generation.