shill: implement heuristic for WPA/WPA2 bad-passphrase detection

BUG=chromium-os:23211
TEST=new unit tests, manual (see below)

Collateral changes:
- alphabetize properties in Service::Load, Service::Save
- clean up some comments (remove stale ones, fix typos)
- minor refactoring of WiFi::HandleDisconnect, so that we
  don't bail early if we can't find the network to disable

Manual testing:
- Try connecting to a WPA network using the wrong password.
  Note that the password must be syntactically valid.
  (E.g. try "abcdefgh".)
- Observe that Chrome shows the "Network Connection Error" dialog.
- Dismiss dialog.
  /home/chronos/user/shill/shill.profile
- Try connecting to a WPA network using the wrong password.
  Note that the password must be syntactically valid.
  (E.g. try "abcdefgh".)
- Observe that Chrome does NOT show the "Network Connection Error" dialog.

Change-Id: If8f223432c324862965729e05b20b455177ca1f5
Reviewed-on: https://gerrit.chromium.org/gerrit/23290
Reviewed-by: Gary Morain <gmorain@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: mukesh agrawal <quiche@chromium.org>
diff --git a/mock_wifi_service.h b/mock_wifi_service.h
index f39492d..f9e3bf9 100644
--- a/mock_wifi_service.h
+++ b/mock_wifi_service.h
@@ -27,6 +27,7 @@
                   bool hidden_ssid);
   virtual ~MockWiFiService();
 
+  MOCK_METHOD1(SetFailure, void(ConnectFailure failure));
   MOCK_METHOD1(SetState, void(ConnectState state));
 
  private: