TilemapLayer / Tileset performance and documentation

Huge scrolling-performance efficiency increase and some cleanup.
Loops simplified a bit, with post-condition always in loop body (makes `continue` more useful). Variable meaning documented above.