Better OpenGL context state management, some more tests