TileAtlas: Fix broken atlas generation

The stuff committed in 56226c40c6113bc2da19c6b17e23cfd9cdbb613b
was actually completely broken.. oops.
Tilemap: Rewrite to only process and render visible region

Previously, on creation, we would parse the entire map data,
translating it into and uploading vertices once, then rendering
the entire map on every draw (to keep the draw calls minimal).
This worked great for smaller and medium sized maps, but starting
with larger maps (200x200+) it doesn't scale as the GPUs vertex
processing/culling is overwhelmed by the amount of data each frame.

This rewrite instead changes the strategy to only processing and
uploading a small subregion of the map (the currently visible part)
and regenerating all buffers if this subregion changes. The amount
of data transferred is small enough that it can be done every frame
without causing lag.

The changes also have the convenient side effect that we no longer
require 32 bit indices in mkxp, easing the road to possible GLES2
support in the future.
Wrap IBO index type into one definition

Makes it easier to switch between types (eg. 32 -> 16 bit).
Bitmap#get_pixel: Use cached client side copy of pixels

A very simplistic optimization for games that create a
Bitmap and then only ever query pixels from it.