Use RPOPLPUSH to walk the queue in #queued

Similar to #918, this will not be memory intensive when dealing with a large queue.