Minor cleanup to tex hash and clut check.
Add a secondary texture cache again.

This time, only used when invalidations happen several times, but not
too often, and still hashes the entire texture.
Use SSE2 in the texture hashing function.

Speeds it up significantly, but only when it's called a lot.
Check for low GPU memory and try to disable cache.

This may help with phones and even desktops without much VRAM/RAM.
Normally OpenGL will copy between them, though, so it should not happen
often, especially not on desktops.
Merge pull request #1676 from unknownbrackets/texcache

Add back second texcache, improve perf, add memory check