Use gmock on property_change_listener

1. Mock property_change_listener;
2. Make unit test link against gmock
3. Update TestManager to use mocked property change listener.
4. Fix an issue found by the updated test case, that when the properties
are changed during host is on, and changed back to the same as before,
when host becomes off, the properties shall remain the same and listeners
shall not be notified.

Change-Id: I815b59cb23edfcac910c2a8c26ea5a71e872d92f
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/manager.hpp b/manager.hpp
index 7c00122..172105b 100644
--- a/manager.hpp
+++ b/manager.hpp
@@ -81,17 +81,37 @@
          */
         std::string getSettings(const char* setting) const;
 
-        /** @brief Set current time mode
+        /** @brief Set current time mode from the time mode string
+         *
+         * @param[in] mode - The string of time mode
+         *
+         * @return - true if the mode is updated
+         *           false if it's the same as before
+         */
+        bool setCurrentTimeMode(const std::string& mode);
+
+        /** @brief Set current time owner from the time owner string
+         *
+         * @param[in] owner - The string of time owner
+         *
+         * @return - true if the owner is updated
+         *           false if it's the same as before
+         */
+        bool setCurrentTimeOwner(const std::string& owner);
+
+        /** @brief Called on time mode is changed
+         *
+         * Notify listeners that time mode is changed and update ntp setting
          *
          * @param[in] mode - The string of time mode
          */
-        void setCurrentTimeMode(const std::string& mode);
+        void onTimeModeChanged(const std::string& mode);
 
-        /** @brief Set current time owner
+        /** @brief Called on time owner is changed
          *
-         * @param[in] owner - The string of time owner
+         * Notify listeners that time owner is changed
          */
-        void setCurrentTimeOwner(const std::string& owner);
+        void onTimeOwnerChanged();
 
         /** @brief Notified on settings property changed
          *