d3d9: Emulate some logic ops with blending.

This makes Brave Story's intro visible.  Also add for GLES2/GLES3, but
doesn't seem to work on GLES2.
gles: Avoid pow(<= 0, 0) entirely, undefined.

Should work on more driver versions.  Fixes #6941.
Merge pull request #6942 from unknownbrackets/gpu-minor

gles: Avoid pow(<= 0, 0) entirely, undefined
Merge pull request #6940 from unknownbrackets/blend-logicop

d3d9: Emulate some logic ops with blending
Merge https://github.com/hrydgard/ppsspp