cleanup and refactor to allow for an opts object to be used

Also paving the way for caching the http.Agent on a per-proxy basis.
Planning on using lru-cache for that.