Only cache image tiles

This avoids caching of e.g. UTFGrid tiles, which are not represented by a
DOM element and break css classes management as a consequence of this.
Adding missing requires.
Do not deal with layers that have non-Image tiles
Merge pull request #1018 from ahocevar/tilemanager-image-only

UTFGrid examples broken because of TileManager. r=@bartvde