shill: vpn: Support {Password|PSK}Required VPN provider properties.

This patch also switches the Provider property from a Stringmap to a
KeyValueStore because it needs to contain both string and boolean
properties.

BUG=chromium-os:27323
TEST=unit tests, tested on device with list-services and chrome://settings

Change-Id: I8f2f1411e3dabce5059753dd9ee09b64e65c0b9d
Reviewed-on: https://gerrit.chromium.org/gerrit/21184
Commit-Ready: Darin Petkov <petkov@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
diff --git a/key_value_store.cc b/key_value_store.cc
index 15687ba..2d88a57 100644
--- a/key_value_store.cc
+++ b/key_value_store.cc
@@ -60,9 +60,15 @@
   string_properties_.erase(name);
 }
 
+bool KeyValueStore::LookupBool(const string &name, bool default_value) const {
+  map<string, bool>::const_iterator it(bool_properties_.find(name));
+  return it == bool_properties_.end() ? default_value : it->second;
+}
+
 string KeyValueStore::LookupString(const string &name,
                                    const string &default_value) const {
-  return ContainsString(name) ? GetString(name) : default_value;
+  map<string, string>::const_iterator it(string_properties_.find(name));
+  return it == string_properties_.end() ? default_value : it->second;
 }
 
 }  // namespace shill