Fixed MiniMapItem not deleting its image when deleted.
Don't crash or complain if RoofObject is passed 0/none for cap/slope tiles.
Don't make the PencilTool current when opening a building when in tile-edit mode.

The recently-added ToolManager behavior of activating a tool if no tool was
currently active takes care of this.
Fixed MiniMapItem creating its image when constructed.

The MiniMap may not be visible, and the minimap image would be twice when
opening a document twice due to the map-scene's sceneRect changing.
Change Tile::mImage from QPixmap to QImage to allow multithreaded rendering.
Fixed tilesets with a transparent color being loaded incorrectly.

QImage::createFromMaskColor returns a 1-bpp image.
Fixed TilePainter using the map bounds when it should use layer bounds.

This only came up because I had a map that was smaller than its layers.
(Due to a broken BuildingEd export I think).
Multithreaded minimap gets updated when tiles are painted.
Created the ShadowMap class to keep the minimap's map up-to-date.
Simplified minimap threading and handle lot-maps changing.

The whole mPauseForMapChanges and mGoingToSleep business wasn't needed,
just have the main thread block until rendering has finished before modifying
mImage or mShadowMap.
Cleaned up MapRenderer use of mAbortDrawing.
Fixed several cases where "return 0" was used instead of "return QString()".
Made 2 global functions into methods of FurnitureGroups.

The only reason they were global is because I thought the header would have
had to include simplefile.h, but that isn't so because only references to
SimpleFileBlock are used.
Added 'const' to various arguments where GCC complained (but not MSVC).
Added parentheses in an "if" expression in BaseObjectTool::mouseMoveEvent.
Removed an unused variable.
Merge branch 'zomboid' into tile-image
TileLayer reference-counts used tilesets.

MiniMap and MapImageManager need to know (quickly!) which tilesets are
used by a map.  Instead of scanning through every tile in a tile layer,
keep a dictionary mapping a tileset to the number of cells using tiles
in that tileset.
MapImageManager now renders map images in a separate thread.

Threads were already used to read map images from disk.  The new thread is
used to paint a new map image.
Added #ifdef ZOMBOID around Tile image -> pixmap changes.