Changed implementation of proxy setup

Changed the setup_http_proxy method to setup_proxy.
The same arguments are used as before. This change includes
workarounds for pulp proxy configuration. However, until BZ1114083
is fixed, easier proxy support will not be possible.
I like the urlparse suggestion. However, if you just put the hostname (e.g. ginger.lab.eng.rdu2.redhat.com) then r.hostname returns nothing. What we could do is set the value initially, then test if urlsplit().hostname returns something and set the value to that.

proxy_port = os.environ.get('PROXY_PORT')
if urlsplit(proxy_port).hostname:
    proxy_port = urlsplit(proxy_port).hostname