Simplify handling of solid quads
Make cache dependencies work correctly

Each cache item now have reference counter for dependency handling.
New implementation keeps CacheItem structure, key and value in
one continuous memory region to simplify access to cache item through value pointer.
Eliminate global reference to TileEngine