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.
Fixed Widget lifetime issues caused by CompoundEditor.editors().

I don't understand all the details, but the fact that the __recurse() function was referring to a variable in an outer scope caused python to hold on to a reference to that variable after editors() returned. Rewriting to avoid referring to the outer scope fixes the problem.

This problem first showed itself in the new shutdown checks, after using the Filter tab on the ShaderAssignment UI to create a new filter.
Added workaround for inexplicable gc.get_objects() behaviour.
Improved debugging suggestion in application shutdown checks.

objgraph for the win!
Fixed Viewer __updateRequest errors at shutdown.

Somehow the view was living long enough to make update requests after the view had died. Providing a fallback value to the WeakMethod prevents an error being raised here.
Merge pull request #857 from johnhaddon/shutdownImprovements

Shutdown improvements