Improved shutdown checks.

Moved the check from the gui app into the bin/gaffer.py app launcher. It is more appropriate here because the checks will be performed for all apps, and the checks might be inappropriate in some other hosts. For instance, when apps are hosted in a 3rd party app, EventLoop.start() returns immediately, and the checks would be performed prematurely, and in any case other apps might be legitimately running alongside it already, managing their own resources perfectly well.

Also added checks for zombie widgets still alive at shutdown.
Stopped ApplicationMenu creating zombie widgets.

It used to store the About window and Preferences windows as globals, meaning they could never ever die. They are now stored on the ScriptWindows they get parented to, and only weakrefs are used in the globals to help track them. In this case, no real harm was done, but since other UIs can hold on to significant resources (and cause shutdown crashes if they hold InteractiveRender nodes at shutdown), it's worth being strict everywhere in order to be able to warn of genuine problems at shutdown.
Fixed circular reference in op app.
Worked around shutdown issues caused by IECore.Parameterised.