Optimize linked shader lookup in ApplyShader().

We already iterate all (skipping that with an if helps, though), and the
list of shaders in most games is pretty small.  Using a map is not gaining
much, and actually makes the whole thing slower.

Cuts from 9.84% time in Tales of Phantasia X (lots of flushes) to 1.85%.
Decode 16-bit textures a bit more directly.

Improves performance in God of War.
Flip around the texture key to invalid faster.
Merge pull request #2570 from unknownbrackets/perf

Small performance improvements (textures, shader lookup)