DO NOT MERGE Captive portals: login activity probes like NetworkMonitor

This patch changes CaptivePortalLoginActivity captive portal test to be
consistent with NetworkMonitor by:
 - using Network.java to open the http connection.
 - adding a UserAgent property to the request header.

Test: manually tested.
Bug: 32369183

(cherry picked from commit cdf3ba48ccef0f9c6ca8724c1c106df0dd725ad0)

Change-Id: I559eb0497475daad758ba3b3395225dcd0a27a57
3 files changed