gdkgltexture: Avoid use-after-free when switching GdkGLContext
thread_current_context might be holding the last reference to
previous, in which case gdk_gl_context_make_current on the new
context will free previous, leaving it a dangling pointer.
Avoid this by making sure to hold a reference.
Fixes: 41cd0c6f "gl: Fix initial EGL context creation on X11"
Resolves: #6995 (closed)