Set amask based on ReplaceAlphaWithStencil()
Regroup Stencil Testing
ReplaceAlphaWithStencil() has been checked for gstate.isStencilTestEnabled()
Merge pull request #4913 from raven02/patch-25

Set alpha mask based on ReplaceAlphaWithStencil()