Adds the functionality to do HTTPS downloads behind proxies using an

HTTP CONNECT.

Implementation of #392