Standardize queue iteration

All iteration over mt_queues should be done with either
mt_queue_each_val or mt_queue_dequeue_each_val.