shill: WiFi: Drop IPConfig when selected service disconnects

This will clean up stale IP addresses at disconnect time, and
will also allow dependent connections like VPN to be notified
when the connection they depend onis no longer available.

BUG=chromium-os:23929
TEST=New autotest network_WiFiManager/080DisconnectClearsIP
https://gerrit.chromium.org/gerrit/23312

Change-Id: I90891309cf776af9666971a402c9728c0e7dd789
Reviewed-on: https://gerrit.chromium.org/gerrit/23315
Commit-Ready: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/device.cc b/device.cc
index 3d1d010..d0095e7 100644
--- a/device.cc
+++ b/device.cc
@@ -461,10 +461,8 @@
     if (selected_service_->state() != Service::kStateFailure) {
       selected_service_->SetState(Service::kStateIdle);
     }
-    // TODO(pstew): We need to revisit the model here: should the Device
-    // subclass be responsible for calling DestroyIPConfig() (which would
-    // trigger DestroyConnection() and Service::SetConnection(NULL))?
-    // Ethernet does, but WiFi currently does not.  crosbug.com/23929
+    // Just in case the Device subclass has not already done so, make
+    // sure the previously selected service has its connection removed.
     selected_service_->SetConnection(NULL);
   }
   selected_service_ = service;