ssl-proxies: Fix several race conditions

In particular the race in CertificateIOUtil has caused signing policies be registered with the wrong hash. This in turn causes certificates from the corresponding CA to be rejected.

Once accepted I will submit a patch for the v2.0 branch.