Switch to use ComponentManager for traits/components

Removed the old StateManager, CommandManager and related classes
and switched over to using ComponentManager for all device trait and
component definitions as well as device state.

Change-Id: I99b99a935ba217703d31aa523a3124cca0fa3e90
Reviewed-on: https://weave-review.googlesource.com/1788
Reviewed-by: Alex Vakulenko <avakulenko@google.com>
diff --git a/src/mock_component_manager.h b/src/mock_component_manager.h
index aa58177..e30b8b0 100644
--- a/src/mock_component_manager.h
+++ b/src/mock_component_manager.h
@@ -29,7 +29,9 @@
                     ErrorPtr* error));
   MOCK_METHOD1(AddComponentTreeChangedCallback,
                void(const base::Closure& callback));
-  MOCK_METHOD5(AddCommand, bool(const base::DictionaryValue& command,
+  MOCK_METHOD1(MockAddCommand, void(CommandInstance* command_instance));
+  MOCK_METHOD5(MockParseCommandInstance,
+               CommandInstance*(const base::DictionaryValue& command,
                                 Command::Origin command_origin,
                                 UserRole role,
                                 std::string* id,
@@ -89,6 +91,18 @@
                      const base::DictionaryValue&());
 
  private:
+  void AddCommand(std::unique_ptr<CommandInstance> command_instance) override {
+    MockAddCommand(command_instance.get());
+  }
+  std::unique_ptr<CommandInstance> ParseCommandInstance(
+      const base::DictionaryValue& command,
+      Command::Origin command_origin,
+      UserRole role,
+      std::string* id,
+      ErrorPtr* error) {
+    return std::unique_ptr<CommandInstance>{MockParseCommandInstance(
+        command, command_origin, role, id, error)};
+  }
   StateSnapshot GetAndClearRecordedStateChanges() override {
     return std::move(MockGetAndClearRecordedStateChanges());
   }