Fix ConnectivityManagerApi23Test failures and remove duplication.

1. All ConnectivityManagerApi23Test were failed due to
   WifiManager#setWifiEnabled doesn't allow to use since
   Android Q. So we need to use shell command to enable/disable
   Wi-Fi instead.
2. Some methods are duplicated between
   ConnectivityManagerApi23Test and ConnectivityManagerTest, but
   they are not identical. So put these methods into
   ConnectivityUtils to clean up duplications and prevent fork
   happened again.

Bug: 133334943
Bug: 133209319
Test: Run the below tests on Crosshatch, Sailfish, Bonito.
      atest CtsNetApi23TestCases
      atest CtsNetTestCases

Change-Id: Ic37111cb12a46f5c36c2be887250c5d762216f6e
6 files changed
tree: d1a5febc1de10a0bc6030ef4d8e9bb2ca03b89e5
  1. tests/