shill: service: Do active checks on PortalCheck and ProxyConfig

Change both properties to be derived strings.  Validate the various
values of the PortalCheck parameter.  Force a restart of portal
detection if either parameter changes, so that we can switch from
Portal to Online or vice vesa if by changing this parameter we are
changing the behavior of portal check.

BUG=chromium-os:29745
TEST=New unit tests.  Manual: Set Proxy configuration on a service
in portal state while on the login screen.

Change-Id: I86c386e61396a23103f99382c568372b4774f452
Reviewed-on: https://gerrit.chromium.org/gerrit/21027
Commit-Ready: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/mock_manager.h b/mock_manager.h
index ce40b62..02c92b5 100644
--- a/mock_manager.h
+++ b/mock_manager.h
@@ -29,6 +29,7 @@
   MOCK_METHOD1(RegisterService, void(const ServiceRefPtr &to_manage));
   MOCK_METHOD1(UpdateService, void(const ServiceRefPtr &to_update));
   MOCK_METHOD1(DeregisterService, void(const ServiceRefPtr &to_forget));
+  MOCK_METHOD1(RecheckPortalOnService, void(const ServiceRefPtr &service));
   MOCK_METHOD2(HandleProfileEntryDeletion,
                bool (const ProfileRefPtr &profile,
                      const std::string &entry_name));