gl/cocoa: Store a weak reference to the `GstGLWindow` instead of the `GstGLContext`
We can't rely on the GstGLContext
to stay alive and need to keep track
of it. For that we keep track of the GstGLWindow
in a weak reference
to avoid a reference cycle, and get the corresponding GstGLContext
whenever needed.
Fixes #1697 (closed)
CC: @ystreet
Edited by Nirbheek Chauhan