All functions now use shared_ptr<priv_queue>.

This slows down the operations a bit (about 5%), but as a first cut is
the easiest way to eliminate queues being freed by their initial clients
before while their suppliers may still be pulling calls out of them.