Cipherscan fixes, speedups and saving of certificates

 * reduce forks to make the script faster
 * implement caching of ca certificates, saving of end entity certificates
 * don't retry connections to server with given protocol version if it refused it previously

Example speedup (scanning Alexa top 900 sites on 8 core machine):
old code:
real    17m36.456s
user    39m44.715s
sys     42m31.756s

new code:
real    11m35.938s (34.2% faster)
user    38m16.861s (3.7% faster)
sys     13m44.998s (67.7% faster)