Fixed bug in StandardGraphLayout node insertion code.

The bug appears to have been exposed by the introduction of the internal pass-through connections in the recent GafferScene optimisations. The test necessary to skip the target node when considering insertion targets existed only in the "make the connections" loop, and not in the "can we make the connections loop?". Moving all the tests into only one loop avoids duplicating them and helps ensure similar bugs won't creep in later on.
fixed threading bug where the scene procedural's allRenderedSignal() could get called more than once
reverted to atomic<int> approach, with an atomic decrement and check instead. Also mutexed the allRendered signal call
Merge pull request #1088 from davidsminor/allRenderedSignalFix

fixed scene procedural's allRenderedSignal() threading bug
Update Changes
Bumped version to 5.0.1
Added support for invalid variants to GafferUI._Variant.fromVariant()

They are returned as None.
Added TextWidget setErrored()/getErrored() methods.

When errored is true, the widget is displayed with a scary salmon background.
Added error display to string and numeric PlugValueWidgets.

If an exception occurs when calling plug.getValue(), the widget is displayed with a red background to indicate that the current value is invalid. This is of most use when creating expressions to drive those values, because it's very easy to get an expression wrong temporarily, and before this totally broke the UI update.
Merge pull request #1090 from johnhaddon/expressionErrorHandling

Expression error handling
Merge pull request #1087 from johnhaddon/insertNodeFix

Fixed bug in StandardGraphLayout node insertion code.
Updated GafferUI for recent IECoreGL::HitRecord API change.

The HitRecord now simply stores an integer rather than an InternedString for the name, so we use NameStateComponent to provide a mapping to names. In future, we may ditch the use of names entirely to avoid the unnecessary construction of many InternedStrings.
Added GafferSceneUI::SceneGadget class.

This contains a small OpenGL scene graph implementation which can be selectively updated based on plug dirtiness in Gaffer. This is an improvement over using IECoreGL::Renderer with GafferScene::SceneProcedural, which has to regenerate the entire scene for every Gaffer change.

This is intended to form the basis for scene viewer with improved performance.
Reimplemented SceneView using SceneGadget.

This gives a 3-20x speedup in tests where only the transform plug is being dirtied. It is of particular benefit when the objects are in the scene take significant amounts of RAM, as by only computing the new transforms we entirely avoid the cache thrashing that would otherwise occur.
Fixed SceneGadget deadlock with python expressions.

The GIL must be released on the calling thread any time the SceneGadget might evaluate the scene on a TBB worker thread, in case the node graph contains nodes which use Python.
Fixed Grid node shader assignment.

It was still using a key of "shader", but we now use "gl:surface" to differentiate OpenGL shader assignments from those for other renderers.
Reimplemented SceneView grid using SceneGadget.

This allows us to remove the annoying little WrappingProcedural class.
Removed motion blur preprocessor from SceneView.

This is no longer needed because SceneGadget ignores motion blur entirely.
Removed bloat from SceneProcedural.

It had a lot of features which were shoehorned in to support SceneView features - happily these are no longer needed now we have SceneGadget to form the basis of the SceneView.
Added todo to RenderableGadget.