Refactor: Move isPoweredOn to utility

The check of power on will be used by other components, so move it to
utility.
There are several constexpr definitions are used by multiple components,
move them into types.hpp so that we do not have duplicated constexprs.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I42ad142d6e7ae8da9c0cf6d8f5cb21dee229eba2
diff --git a/utility.hpp b/utility.hpp
index f6c40d8..ffc489c 100644
--- a/utility.hpp
+++ b/utility.hpp
@@ -125,6 +125,13 @@
  */
 phosphor::pmbus::Type getPMBusAccessType(const nlohmann::json& json);
 
+/**
+ * Check if power is on
+ *
+ * @return true if power is on, otherwise false
+ */
+bool isPoweredOn(sdbusplus::bus::bus& bus);
+
 } // namespace util
 } // namespace power
 } // namespace phosphor