Move findPreferredUpstreamType into UNM

This changes the way in which available networks are found. Previously
Tethering asked ConnectivityService for NetworkInfo and checked for
whether or not it was in state CONNECTED.

Here we use the fact that ConnectivityService will not call UNM's
callbacks' onAvailable() methods until the networks in question have
become connected.

Test: as follows
    - built
    - flashed
    - booted
    - runtest framework-net passed
Bug: 32163131

Change-Id: I97abe225fdd3accb38bd9168f545445b761a90d8
4 files changed