Also enables leakchecking and removes leaks from hashtable tests and
some other leaks that were obvious. There are some X11 leaks still
present but I don't think these are caused by me.
Adds a texturecache to prevent multiple loads of the same texture. Texture
dimension is now only intended for the actual texture dimension. Sprite
should hold the "rendering dimension". Music songs now load and unload
when switching songs. Standardized a lot of dimensions.