Only allow HTTP capport URLs on test networks

HTTP URLs on localhost for the capport API should only be accepted on
networks with TRANSPORT_TEST.

This change also introduces the first changes to fix thread safety
issues in NetworkMonitor, where LinkProperties or NetworkCapabilities
are read from the evaluation thread, even though they are updated from
the StateMachine thread. The EvaluationThreadDeps class should be
augmented in later changes to hold thread-safe copies of what the
evaluation thread needs.

Bug: 156062304
Bug: 155455470
Test: atest NetworkMonitorTest

Original-Change: https://android-review.googlesource.com/1315226
Merged-In: I65bb54c581965159b99d7ac8596304ceb6b5f2cb
Change-Id: I65bb54c581965159b99d7ac8596304ceb6b5f2cb
4 files changed