Fixed potential lock ordering deadlock

- fixed deadlock while holding ChunkMap and accessing Chunky vs. holding Chunky
  and accessing ChunkMap
- fixed deadlock while holding Minimap and accessing Chunky vs. holding Chunky
  and accessing Minimap
- fixed some cases of accessing UI stuff outside EDT