WifiNetworkFactory: Handle network requests already being processed

These network requests could be sent back to the factory (during
re-evaluation by connectivity stack?).

Note: I see some similar code in WifiAwareNetworkFactory, so this can
happen although not been reported for wifi so far.

Also, fixed a bunch of pre-approval code path unit tests to remove the
first request before triggering the new request (which is the correct
scenario to test).

Bug: 179884245
Test: atest com.android.server.wifi
Test: atest android.net.wifi.cts.WifiNetworkSpecifierTest
Change-Id: I4e7663d07ece3ba6b4431d32e60f63b0627c213a
2 files changed