Make onion queues rational, combine with workqueue logic.
Right now we have two queues for onions: one before we hand things over to the workqueue, and the workqueue itself.
Soon we'll have a client-side queue for onions, plus the workqueue. (#13737 (moved))
Having these extra queues is mildly helpful, since it lets us implement queueing rules more complicated than "first in first out", but it makes our code more complex. Perhaps we should abstract the priority rules and make the workqueue code the only queue we need to care about.