Added file locking levels, file locking resolutions and  some other small tweaks

Region data caching has been refactored. The new approach is much
simpler than the previous approach, and it also fixes an unlikely but
possible world corruption bug that could happen when saving worlds.