buffet: Migrate StateChange to native_types::Object.

chromeos::Any is convenient for DBus, but the rest of
the system prefers to work with higher level abstractions.

Also it is somewhat too late to analyze Any when processing
StateChange, as to do that properly one needs full package
definition.

BUG=chromium:434767
TEST=cros_workon_make --test buffet

Change-Id: Iaf12c2e8e7e8f9c84f6492d9fbd8a495be3c0a94
Reviewed-on: https://chromium-review.googlesource.com/231035
Tested-by: Anton Muhin <antonm@chromium.org>
Reviewed-by: Anton Muhin <antonm@chromium.org>
Commit-Queue: Anton Muhin <antonm@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/buffet/states/state_package.h b/buffet/states/state_package.h
index b2e1383..1430b5c 100644
--- a/buffet/states/state_package.h
+++ b/buffet/states/state_package.h
@@ -65,6 +65,13 @@
                         const chromeos::Any& value,
                         chromeos::ErrorPtr* error);
 
+  std::shared_ptr<const PropValue>
+  GetProperty(const std::string& property_name) const {
+    auto it = values_.find(property_name);
+    return it != values_.end() ?
+        it->second : std::shared_ptr<const PropValue>{};
+  }
+
   // Returns the name of the this package.
   const std::string& GetName() const { return name_; }