SelfRecovery: Module for initiating internal stack restarts

Adding a new module for initiating stack restarts when we detect some
kind of failure internally. This module essentially moves the
|restartWifiStack| functionality out of WifiLastResortWatchdog so that it
can be reused by WifiStateMachine for HAL/wificond crashes.
The 3 reasons for triggering self recovery currently are:
1. Last resort watchdog bite.
2. HAL crash.
3. Wificond crash.

TBD: We could potentially perform the same recovery on a supplicant crash.

Bug: 36586897
Test: Manual tests by crashing the HAL & wificond.
Test: Unit tests.
Change-Id: Id3e0c2cc7b339ff02ae4a5597a1f2009cb946125
7 files changed
tree: f68942d2d51e58871c27e0c4f95eab2cfdaef23c
  1. service/
  2. PREUPLOAD.cfg