I like this way of cleaning up, because it will result in cleaner queues without the need for compacting. The reason I did not do this, is that it was unclear to me if any race conditions will be introduced by this. For example, the check for `self.status == Status.QUEUED` is something that should not be done, because what if another worker decides to pick up the job and flip the status flag right before the actual deletion occurs?

The safe thing to do is to delete the job hash first, and only after that happened, clean up the dangling references.

This means, though, that workers should still assume that a job reference might exist (for a brief while) and that it's still possible for them to pop dangling references from the queue and, thus, not find a job hash. These still should be ignored.

That said, I would love to accept this patch—it keeps the cleanup logic in a saner place. (But it's important to first call `self.delete()`.)