Avoid race conditions when enqueueing job with dependency.
Simplify enqueue_waitlist by using lpop.
Internally renamed the term "parent" to "dependency".