WIP: Refactor certificate agent and queue

Details to follow...
In general, I really really like the shape of this.

I think it could just be QueueMonitor, because it could monitor lots of different kinds of queues.