Allow specification of a certificate to use for SSL validation

* Setting the 'cacert' parameter to point to a PEM formatter certificate results in using that certificate for validation
* Added several SSL tests alongside the http tests
* Added tests for new functionality