support for upstream proxy

if behind a corporate web proxy, you must define a proxy (host, port,
user, password) via the option --http-proxy, as net/http doesn't read
the environment variable HTTP_PROXY
Merge pull request #9 from thomd/http-proxy

support for upstream proxy
Small refactoring of proxy handling