Implements texture packs and thus fixes #10.

Also ensures that texture updates cause a redraw. I'm not really happy
about the triple loop, but it'll do for now.