Safeguard QQuickWindow::hide() against other GL contexts.

If another GL context is bound to another surface on the GUI
thread, we can run into issues while cleaning up the SG nodes.

Task-number: QTBUG-34898
Change-Id: Ifa02b7cdbc7ab38b3a149a21452cc5071498a7d1
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>