WIP: Refactor certificate agent and queue

Details to follow...
I think I find _reply() less clear than just calling put() with a **dict. Did this simplify something else, or...?