tweak game loop a bit

- renamed io loop to game loop
- added div for stats, simple map offset display
add support for tile layers

- updated map class, added layer class to support tile layers
- cleaned up viewport class a bit