Gl get tex env

Implements glGetTexEnviv, glGetTexEnvfv in GL emulation mode, and fixes two other minor issues.