softgpu: Fix stencil read/write in some formats.
softgpu: Never write alpha, only stencil.
Invert gstate.getClearModeColorMask().

It makes more sense matching gstate.getColorMask().
softgpu: Simplify color clamping.
softgpu: throughmode doesn't disable any tests.
softgpu: Apply stencil op even when depth disabled.
softgpu: Don't apply logic op to stencil value.

Also, they were not at all applying correctly.
softgpu: Fix reversed stencil test funcs.

LESS applies to the ref compared to the stencil, not the stencil compared
to the ref.

With this, stencil testing is finally being done properly in Star Ocean.
Merge pull request #4496 from unknownbrackets/softgpu

Fix stencil testing in the softgpu, and also some small things along the way