TRQ-1608. Fix a deadlock due to the reroute_job_mutex not being used properly in the hierarchy. The locking order should be reroute_job_mutex, then the all_queues, then the queue.
Merge https://github.com/actorquedeveloper/torque