WifiService: API to indicate that emergency scan is in progress

This API will be used by WifiScanner to indicate the start/end of the
processing of an emergency scan.
ActiveModeWarden will ensure that wifi
is on for the duration of the scan (except if the user toggles APM mode
on in between):
> If any of the other wifi or location toggles are already on, this
API is a no-op.
> If the wifi stack is fully shutdown, then this API will enable the
wifi stack in scan only mode.
> If the user toggles wifi or location off while this scan only mode
is enabled, will ensure we don't fully shutdown the wifi stack.
> If the user toggles wifi or location on while this scam only mode
is enabled, will move into the requested state.
> This API also works while the wifi stack is in emergency mode.

Note: Enforcement of only allowing emergency scan for this duration is
handled by WifiScanner.

Bug: 148390035
Test: atest com.android.server.wifi
Test: More unit tests incoming.
Change-Id: Ibf2ee370dcb20459429537e6de6cffba3e909949
8 files changed