[FIXED JENKINS-18058]

[JENKINS-18058](https://issues.jenkins-ci.org/browse/JENKINS-18058) Waiting 100 millis and retrying just once if premature EOF reached for
stream in port-based cli connection. Throwing exception if unable to
connect still, instead of initializing array with negative size as
before. PowerMock-based unit test introduced to test this specific
case, hence ConnectionMockTest instead of ConnectionTest class usage;
PowerMock requires a dedicated class, indeed.