Benchmark: show slowness when accumulating job instances.
Fix perf with accumulating job instances.

The old code was, for all step instances of a particular
class, iterating over all step instances that class in
order to do the dependency filtering in a way that supported
`run_jobs_in_serial`.

This was an O(n^2) operation that isn't usually necessary.
Add benchmark demonstrating bad perf with enqueing a batch.
Refactor: move terminal step setup out of the DFS.

The circular dependency detection has extremely bad
perf, and I want to refactor it. Splitting the
terminal step setup out of the DFS will make this
easier.
Refactor: use stdlib tsort rather than our home grown approach.
Merge pull request #51 from seomoz/address_perf_issues

Address perf issues