Rewrite calls to Proxy.getPreferredHttpHost

Use java.net.URLConnection which is the only maintained method of
making http requests from java.

These were the last calls to getPreferredHttpHost and that hidden
API will now be deleted.

Change-Id: I97e022507ba656f627754af4e889f4812314ea90
Merge "Rewrite calls to Proxy.getPreferredHttpHost"