Correctly track added and removed state to fix various alpha testing issues
Closes#6119
See merge request OpenMW/openmw!989
(cherry picked from commit 94be4eba18d328391a2c2aea85bb029e80b32cee)
0e57622b Correctly track added and removed state
e42b3bf9 Adapt destination alpha factor for AMD
84a9face Disable coverage adjustment for blended objects
https://www.khronos.org/registry/OpenGL/specs/gl/GLSLangSpec.1.20.pdf
Section 4.1.3 says that hexadecimal integer literals are supported, but
Nvidia have never read a specification since their founding, so their
engineers didn't know that hexadecimal integer literals are requires to
be supported to advertise support OpenGL versions with GLSL support.