Fix some rare spec failures by synchronizing JobQueue more thoroughly.
Clean up JobQueue by using a Monitor instead of a Mutex.