Fixed GafferTest.TextWriter so the mode can be serialized.
LocalDispatcher foreground tasks use ExecutableNode::execute() directly.

Previously it was using the gaffer execute app, which had a significant startup time, and prevented asynchronous task execution.

Also re-wrote LocalDispatcherTest using TextWriter in append mode, since the modification times aren't a good metric now that we're mixing foreground and background execution.
Re-designed dispatching using a graph of TaskBatches.

A Dispatcher::TaskBatch describes its node, context, frames, and required TaskBatches. doDispatch() is now given a top level dummy TaskBatch containing graph of TaskBatches. Each dispatcher must ensure that the required batches are executed in the correct order, and must be aware that an individual TaskBatch may appear several times in the graph due ot interleaving requirements.
LocalDispatcher allows each ExecutableNode to force foreground dispatching.

Each ExecutableNode has an executeInForeground plug in the Local section of the Dispatcher plugs. This is used by the LocalDispatcher to determine when it's safe to start dispatching from a background thread (if the executeInBackground plug is on in the first place).

Fixes #927.
Removed hack to force background renders.
Reorganizing TaskBatch and Task constructors
Fixing up tests for normal requirement plugs
Merge branch 'foregroundExecution' of https://github.com/andrewkaufman/gaffer into andrewkaufman-foregroundExecution
Added failing RenderManRender foreground execution test.

It leads to deadlock because the Display node needs to acquire the GIL on a background thread, but the GIL has not been released appropriately on the main thread by the dispatcher.
Added GIL release in TaskBatch::execute() bindings.

This is necessary to allow Executable::execute() implementations to use threads if they wish, in case those threads need to enter Python.
Fixed ExecutableNode bindings GIL management.

It was acquiring the GIL before it needed to, and keeping it even when calling the base class implementation, which is C++.