JobManager for long running tasks.  Imported from Drake and cleaned up.

Fixes https://github.com/dart-lang/spark/issues/280