Adding support for TLS connections with X.509 cert

The tls object will throw a 'SELF_SIGNED_CERT_IN_CHAIN' error when using X.509
certificates with a particular host.
Merge pull request #161 from squeeks/master

Add support for client certificates in connection handling