opengl/glrendertimequery: restore the previous OpenGL context after queries and destruction
A lot of code in KWin expects the scene context to be current, so if the render time query changes the context, that code can misbehave severely.
This fixes weird glitches I sometimes get after logging in on my desktop, caused by some code deleting an OpenGL texture in the wrong context