Fix crash when run with Torch Levers mod
Add max chunk draw distance feature.

Adding max chunk draw distance was not as simple as I anticipated.
Saving chunks is an infrequent operation, so even if the player was
close enough at one point to 'view' the chunk, by the time the chunk
needs to be saved the player might not be near anymore.

To address this a 'chunk viewed' flag array was added so that when a
chunk is within a certain distance to the player a 'viewed' flag is set.
Then when saving or updating the map only the chunks that have been
viewed are processed.

Also attempt to fix bug with regions not closing fast enough by stopping
MapTexture from increasing the refCount field on regions.