Detect ClientModeManager transitioning into primary or scan only

This is needed to avoid accidentally starting more than one primary or
scan only CMM when 2 events that could start up CMMs are received back
to back.

Bug: 237219379
Test: atest com.android.server.wifi
Test: Manual testing
Change-Id: I45e53d0fd6a75cf623cbb1d223d46c9afa24966a
3 files changed