shill: Do a better job keeping the Service.State property up to date.

For the network settings UI to behave correctly, service state
transitions need to be reflected in the value of the Service.State
property. The goal here is to emulate flimflam's behavior, but this
is not an exact science. The changes in this CL seem to result
in correct UI behavior.

BUG=chromium-os:28472,chromium-os:28538
TEST=Tested manually under as wide a variety of connect and disconnect
scenarios as I could come up with.

Change-Id: I7c8458cceafc228ba579a32631194bff24602e55
Reviewed-on: https://gerrit.chromium.org/gerrit/19395
Commit-Ready: Eric Shienbrood <ers@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Tested-by: Eric Shienbrood <ers@chromium.org>
diff --git a/device.h b/device.h
index 2dadd3d..9e9d6ed 100644
--- a/device.h
+++ b/device.h
@@ -225,8 +225,14 @@
 
   // Set the failure of the selected service (implicitly sets the state to
   // "failure")
+
   void SetServiceFailure(Service::ConnectFailure failure_state);
 
+  // Records the failure mode and time of the selected service, and
+  // sets the Service state of the selected service to "Idle".
+  // Avoids showing a failure mole in the UI.
+  void SetServiceFailureSilent(Service::ConnectFailure failure_state);
+
   // Called by the Portal Detector whenever a trial completes.  Device
   // subclasses that choose unique mappings from portal results to connected
   // states can override this method in order to do so.