Add ability to use HTTP proxy

Adds HTTP proxy functionality to JenkinsApi::Client, and while we're at it, factors out some duplicated code into a method.