fix HttpClientConnector, add unit test

HttpClientConnector throws IAE on http:// or https:// URIs. The checkArgument logic was wrong. Also it does not handle URI w/o port properly. Now fixed and unit test added to verify it.