Software backend: make TEV rounding match hardware.

Formulas stolen from gxtest.  (Not sure how "==" got turned into "!=", but
I'm pretty confident the patched version is correct.)
Software backend: don't skip red component in TEV.
Merge pull request #275 from magumagu/swbackend-fix-tev

Software backend: TEV combiner compare mode fixes
PixelShaderGen: Fix an issue with color combiner compare mode and simplify the affected line a bit.

This was a mistake of mine when translating floating point values to integer values.
Also, the max() part of that line was just completely redundant because the sign of an absolute value is always greater than or equal to zero.

Fixes issue 7178.
Merge pull request #276 from neobrain/master

PixelShaderGen: Color combiner compare mode fix and simplification
VideoCommon: fix rounding in TEV.

The hardware backends pass the TEV tests in gxtest with this change.
Merge pull request #277 from magumagu/videocommon-fix-tev

VideoCommon: fix rounding in TEV.
D3D11 backend: fix rounding in texture encoder.

We need to explicitly round when converting colors from float to uint
because multiplying a normalized float by 255 might not result in a whole
number.  (The exact result here may vary depending on your
drivers/hardware.)

Ideally, we shouldn't be using floating point here, but fixing that is a
much more complicated patch.

Fixes gxtest TEV tests using Intel HD 4000.
Merge pull request #280 from magumagu/d3d-texture-encoder-rounding

D3D11 backend: fix rounding in texture encoder.