Fixes for the httpclient usage for non-proxy host and adding root cause to exception thrown

applied the a fix to following issues
https://issues.jenkins-ci.org/browse/JENKINS-20251
https://issues.jenkins-ci.org/browse/JENKINS-20614