Ssl verification

Hello,

This adds ssl certificate verification and hostname checking. The request backend has been modified to use urllib2 vs HTTPSConnection and that is the reason for most of the changes.