Added slight speedup for Instancer name computation.

Now allocates the right amount of memory upfront instead of continually resizing the array. This gives ~10% speedup in a simple benchmark.
Improved Instancer bound hash computation.

It now correctly combines the hashes for each instance, rather than actually computing the bound prematurely. This gives an approximately 15% speedup in a simple benchmark.
Removed unnecessary memory allocation from Instancer::instanceContext().

This knocks nearly 20% off the runtime for the hashing of the bounds, and should have similar benefits elsewhere.
Removed unnecessary Context copying from Instancer::hashBranchBound().

This further doubles the speed of this method.
Knocked a further 10% off Instancer bound hashing.

Since we already know the instance index in this one case, there is no need to go getting it from a string->int conversion.
Optimised Instancer::computeBranchBound().

This now uses the same method as is used in hashBranchBound(), reusing a single context for each evaluation of the input. This halves the execution time for bound computation.
Parallelised Instancer::hashBranchTransform().

Because the computation of bounds generally occurs before traversing to the children, the hashing of the union of the bounds of all the instances actually represents a serial bottleneck, which can be quite large when there are a large number of instances. Parallelising this operation reduces the bottleneck, and stops cores sitting idly waiting for work to do.

This gives ~1.8x speedup on a 2 core laptop and ~5.6x speedup on a 6 core workstation.
Parallelised Instancer::computeBranchBound().

This gives similar performance improvements to the previous commit.
Fixed ScriptEditor to execute code in the right context.

Prior to this it was executing without a specific context, and getting the useless default one. It now uses the one set on the editor, which by default is ScriptNode.context() and is shared with all the other editors.
Merge pull request #899 from johnhaddon/scriptEditorContext

Fixed ScriptEditor to execute code in the right context.
Merge pull request #893 from johnhaddon/instancerOptimisation

Instancer optimisation
Removed bound dirtiness workaround in OSLObject::affects().

DependencyNode::affects() is now called when output plugs are dirtied as well as input plugs, so we can now declare the true object->bound dependency.
fixed FilteredSceneProcessor::acceptsInput() crash when inputPlug is null
Added missing import in startup/gui/viewer.py.

This hadn't been seen before because the order config files are loaded in by IECore.ConfigLoader is non-deterministic.
Changed ApplicationRoot::setClipboardContents() to a raw pointer.

It doesn't manage the reference count for the object because it takes a copy.
Removed deprecated Box metadata methods.

The standard Metadata API should be used instead.
Updated OSLImageTest for improved dirtiness signalling.

It should have been updated as part of 2d0ab75b2a27251602379671cd0c7371ad995204.
Updated for IECore::IntrusivePtr -> boost::intrusive_ptr change.

This is necessary for compatibility with the latest Cortex version.
Stopped using python-config for build configuration.

This is for a number of reasons :

- python-config returns paths hardcoded to include the install location it was built with. This meant that we couldn't provide a packaged set of binary dependencies, making building Gaffer much harder than it needed to be.
- We were having to patch the python-config output for the link flags on mac anyway.
- It didn't work for the Image Engine build - we were just ignoring the errors and getting away with it somehow.
Merge pull request #900 from davidsminor/filterdSceneProcessorAcceptsInputCrashFix

fixed FilteredSceneProcessor::acceptsInput() crash when inputPlug is null