Remerge of pull request 141 - Configuring a different SocketFactory for HTTPs.
Merge pull request #170 from william-ferguson-au/custom-https-socket-2

Remerge of pull request 141 - Configuring a different SocketFactory for HTTPs.