Add some fixes for pool / queueing logic.

This implementation requires the user to set up a pool of clients
before running kue. The reason is that we don't want clients to miss
their callbacks due to a race condition.