Add support for shared curl handles and multi-threading
Fix bug in X509Auth