d3d: Centralize parts of the texture cache.

Should merge these.
d3d: Correct texcoord scale.

Very obvious in for example LittleBigPlanet.
d3d: Use unsigned Z in throughmode.
d3d: Handle texture swizzling in ge preview.
d3d: Use unnormalized values for alpha testing.

Fixes Tales of Eternia's world map, Popolocrois everwhere, etc.

If PowerVR is using this method on GLES, it may be broken for the same
reasons.