Use trust_db for querying remote hosts for their ssl hostname
Fix proxy_ca race and order for speedy startup
More refactoring, further comments
Lots of minor improvements/comments