Move zeroPad function to BaseTypes and add tests for it
Modify classes which contained an internal numeric zero padding function to use the one in BaseTypes instead
New tile image cache and tile queue improvements

We now reuse tile images by maintaining a cache of image elements with a
simplified LRU expiry policy (by order, not by timestamp). The tile queue
is bypassed for images that are available in the cache, so they can be
rendered immediately. And the tile queue itself loads more than just one
image at a time now (2 per layer url).
New TileManager

This removes all tile queueing/loading specific code from Layer.Grid
and creates a new class that manages tile loading and caching.
Adding destroy method, as suggested by @bartvde
Configure maps with TileManger instances (and not the other way around)

This resolves issues with destroying caches on window unload, and makes
cache sharing among maps less confusing to configure.
Adding API docs for the tileManager property
Updating tests
moveTimerId is no longer used
512 tiles is too much for some mobile browsers
Remove images from dom when replacing them with cached images
New beforeload event and slightly changed loading sequence

Having the TileManager remove an image from the DOM, then setting the
cached image, and then having to position it felt a bit awkward. With the
new beforeload event, the setImage method and putting renderTile before
positionTile, providing the cached image feels way more natural.
Enable fade-in for tiles from cache when we have a backbuffer
Recovering from merge conflicts
clear the grid when we change from singleTile mode true to false or vice versa, discussed change with @ahocevar see #821 for the details
Addressing @bartvde's review comments
Release notes and additional in-line comment

As suggested by @bartvde.
Merge pull request #702 from ahocevar/smart-queue

New tile image cache and tile queue improvements. r=@bartvde,@elemoine
When the resolution does not change, remove backbuffer tile by tile

This change introduces a new 'replace' mode for tile transitions: when the
resolution does not change, which happens when mergeNewParams is called,
the tile will be marked with the .olTileReplace class. If this class sets
the tile's imgDiv display to 'none', the backbuffer for the tile will
immediately be removed when the tile is loaded.
Fixing tests