shill: Avoid double gets of property store values when iterating.

Cleanup and simplify the property iterator classes by removing the
unused PropertyConstIterator class and caching the property
value. This way we avoid deriving property values twice when iterating
through properties. Also, remove some incorrect and unused logic in
the PropertyStoreInspector related to handling errors coming from the
property store iterators.

BUG=chromium-os:30373
TEST=unit tests

Change-Id: Ie6ba2696f070e1ed43997f17273f48360f85055b
Reviewed-on: https://gerrit.chromium.org/gerrit/24201
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Darin Petkov <petkov@chromium.org>
diff --git a/vpn_driver_unittest.cc b/vpn_driver_unittest.cc
index e0ad631..e37ddbb 100644
--- a/vpn_driver_unittest.cc
+++ b/vpn_driver_unittest.cc
@@ -112,11 +112,10 @@
 bool VPNDriverTest::GetProviderProperty(const PropertyStore &store,
                                         const string &key,
                                         string *value) {
-  Error error;
   PropertyStoreInspector inspector(&store);
   KeyValueStore provider_properties;
   EXPECT_TRUE(inspector.GetKeyValueStoreProperty(
-      flimflam::kProviderProperty, &provider_properties, &error));
+      flimflam::kProviderProperty, &provider_properties));
   if (!provider_properties.ContainsString(key)) {
     return false;
   }
@@ -192,7 +191,7 @@
   PropertyStoreInspector inspector(&store);
 
   // An un-set property should not be readable.
-  EXPECT_FALSE(inspector.ContainsStringProperty(kPortProperty));
+  EXPECT_FALSE(inspector.GetStringProperty(kPortProperty, NULL));
   EXPECT_FALSE(GetProviderProperty(store, kPortProperty, NULL));
 
   const string kProviderName = "boo";
@@ -202,7 +201,7 @@
 
   // We should not be able to read a property out of the driver args using the
   // key to the args directly.
-  EXPECT_FALSE(inspector.ContainsStringProperty(kPortProperty));
+  EXPECT_FALSE(inspector.GetStringProperty(kPortProperty, NULL));
 
   // We should instead be able to find it within the "Provider" stringmap.
   string value;