Implement durable queues

Queues are polled with an atomic 'lpoplpush' method to store a job on an in-flight list. If a worker is terminated immediately while processing a, that job is requeued. Otherwise it is just removed from the in-flight list.

An additional process can be used to requeue jobs in the case a worker was terminated improperly (e.g. via a SIGKILL).