fixing JENKINS-22493 (https://issues.jenkins-ci.org/browse/JENKINS-22493)
improving the error-checking when receiving a response from the remote build server
fixing JENKINS-22427 (https://issues.jenkins-ci.org/browse/JENKINS-22427)
adding a "retry loop" inside sendHTTPCall, so that if the connection failed... it will retry a certain amount of times before marking the build as failed.