Fix setting socket timeout in py3

Unsurprisingly, the internal details vary from py2
to py3 regarding how to get a socket object from an
HTTPResponse class, as the integration tests have
pointed out.