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