refactor TileLayer animation, fix #1140, #1437, #52, #1442

Refactored TileLayer animation so that it happens for each tile layer
independently instead of animating the parent of all tile layers. Moved
TileLayer animation code into a separate file (TileLayer.Anim.js).
Fixes loads of bugs and makes the code easier to understand.