power-utils: Initially add isReadyToUpdate

Initially add isReadyToUpdate() that checks the pre-condition for PSU
update.
For now it only checks the power state and return false if power is on.

When it is not ready to update, there is no need to unbind/bind the
driver, so move the unbind/bind calls into doUpdate() from ctor/dtor.

Tested: Verify it returns and logs "PSU not ready to update" when power
        is on, and continues the update when power is off.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I1cbb454baf735ceb3de883a7317753d46485696f
diff --git a/tools/power-utils/updater.hpp b/tools/power-utils/updater.hpp
index 0d69c0b..befa4fb 100644
--- a/tools/power-utils/updater.hpp
+++ b/tools/power-utils/updater.hpp
@@ -54,7 +54,7 @@
             const std::string& imageDir);
 
     /** @brief Destructor */
-    ~Updater();
+    ~Updater() = default;
 
     /** @brief Bind or unbind the driver
      *
@@ -68,6 +68,12 @@
      */
     void setPresent(bool present);
 
+    /** @brief Check if it's ready to update the PSU
+     *
+     * @return true if it's ready, otherwise false
+     */
+    bool isReadyToUpdate();
+
     /** @brief Do the PSU update
      *
      * @return 0 if success, otherwise non-zero