LocalDispatcher Foreground 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 to interleaving requirements.

This was all done so that the LocalDispatcher can allow 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.