Reworked the texture cache

The texture cache got the same treatment as the geometry cache (and there
was a good amount of copy-and-modify going on between files).  It's got
an unordered_map at the heart of it, plus a nice SAX parser inside.

Also a bunch of typo fixes and small tweaks to the geometry cache.