shill: Cleans-up scan state handling.

This CL does the following:
  o Moves all scan state metrics into SetScanState.
  o Updates local scan state before making DBus calls.

While there:
  o Enhances SetScanState to include the calling method (helps with
    debugging).

BUG=chromium:260759
TEST=unittest

Change-Id: Ie0e3de42183ed4d670786d2e9236e58c94269168
Reviewed-on: https://gerrit.chromium.org/gerrit/62375
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: Wade Guthrie <wdg@chromium.org>
Reviewed-by: Wade Guthrie <wdg@chromium.org>
Tested-by: Wade Guthrie <wdg@chromium.org>
diff --git a/wifi.h b/wifi.h
index efc3869..7a165da 100644
--- a/wifi.h
+++ b/wifi.h
@@ -413,7 +413,9 @@
   // |all_scan_frequencies_|.
   void OnNewWiphy(const Nl80211Message &nl80211_message);
 
-  void SetScanState(ScanState new_state, ScanMethod new_method);
+  void SetScanState(ScanState new_state,
+                    ScanMethod new_method,
+                    const char *reason);
   void ReportScanResultToUma(ScanState state, ScanMethod method);
   static std::string ScanStateString(ScanState state, ScanMethod type);