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.
Improved exceptions thrown from ScriptNode::execute().

We were leaking boost::python::error_already_set exceptions out into C++, which we should not do. C++ code should be able to call methods without any concern for whether or not the underlying implementation uses Python. The Python exception is now converted to a descriptive C++ exception including the line number.
Added ignoreScriptLoadErrors parameter to execute app.

Also improved reporting of errors when the parameter is off and loading fails - instead of a raw python traceback with irrelevant information, a properly formatted message is displayed.
Added todo to LocalDispatcher Job implementation.
Added ignoreScriptLoadErrors plug to LocalDispatcher.

Fixes #1084.
Made ScriptProcedural ignore errors when loading the script.

This isn't ideal, but we don't want the ScriptProcedural to prevent a render occurring when the dispatcher has turned on tolerant loading via `gaffer execute -ignoreScriptLoadErrors`. Because we currently only use ScriptProcedural from ExecutableRender nodes, we're effectively allowing the dispatcher to be the gatekeeper for load errors - if the dispatcher is willing to let them through, then the procedural will just accept that. In practice, this doesn't really change much, since both the IECoreRI and IECoreArnold procedural loaders already just catch exceptions and print them anyway.

If we find use cases where we want the procedural to error properly at a later date, we may need to revert this, or provide a procedural parameter which the ExecutableRender nodes turn on. With a bit of luck, people will get their scripts all shipshape by then, and we won't need tolerant loading in the dispatchers at all.