Submit pending certs to consistent store
Merge pull request #220 from AlCutter/submit_certs

Submit pending certs to consistent store
Remove the magic value passed as a flag to event_active.
Fix a memory leak, as well as a possible race condition.