PixelShaderGen: Simplify stuff
Optimize stuff, 2
Optimizing stuff, 3
Optimizing stuff, 4
More accuracy
Remove old overflow emulation code
Completely kill the RegisterState stuff, fix alpha compare
Fix tev compare
Experimental 11 bit overflow emulation.
Exp stuff, prolly revert
PixelShaderGen: Turns out tev stage outputs are always clamped to at least -1024..1023. That makes 11 bit signed integer overflow emulation needless.

Also, final tev output is a U8 so we do actually need overflow emulation for it.

Removed debugging stuff since it's not necessary anymore.
PixelShaderGen: Emulate precision of 8 bit data
PixelShaderGen: Add helper macros to vastly clean up overflow+precision emulation.

Also fixed a minor issue: Apparently c is being stretched from the 0..255 range to 0..255. Also, lerp result should be U8
Fix a small issue in the comp16/24 stuff. 1.0f*1.0f equals (1/255.0f)*255.0f!
PixelShaderGen: Emulate limited resolution of RGBA6 and RGB565 EFB formats
OGL: Fix some potential issues when blending on EFB formats without alpha
PixelShaderGen: Revert the part of revision f7fcf7e32d6a that forced stretching c from 0..255 to 0..256 (it's just an optimization in VideoSoftware which doesn't differ from floating point logic at all).

Fixes wrong clouds in the ZWW title screen.
Fix some potential issues when blending on EFB formats without alpha.
Clean up state transition tables.

This commit is a cherry-pick of revision 6870c1fdd55c from master to tev_fixes. Previous commits with similar but slightly incorrect changes have been reverted with this commit.
Merge 'master' into tev_fixes.

Conflicts:
	Source/Plugins/Plugin_VideoDX9/Src/Render.cpp
	Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp
PixelShaderGen: Cleanup some tev code.

BPMemory: Assign a more descriptive name to a field in the genmode register.