Move queue group code into new queues module

The queues module will be used for any queue selection logic
and dealing with queue groups.