psutils: Move functions from updater to utils

Move common, utility functions from updater.*pp to utils.*pp.  This will
enable those functions to be used by other command line options in the
psutils tool.

Modify --get-version and --get-model to use the new utility functions.

Also update --get-version to provide a single getVersion() function that
handles the existence of the psu.json file as a low-level implementation
detail.

Tested:
* Verified all automated tests run successfully
* Verified --get-version still works
  * With psu.json file
  * Without psu.json file
* Verified --get-model still works
  * With psu.json file
  * Without psu.json file
* Verified --update still gets correct device path, device name, and I2C
  bus/address from functions that moved to utils.*pp
* The complete test plan is available at
  https://gist.github.com/smccarney/c049e24655d32e22cab9d521d145774a

Change-Id: I51ceca10957dc9a924d0d7516dc29632a6ed82d3
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
diff --git a/tools/power-utils/version.hpp b/tools/power-utils/version.hpp
index 4770a71..98735fe 100644
--- a/tools/power-utils/version.hpp
+++ b/tools/power-utils/version.hpp
@@ -20,58 +20,22 @@
 #include <sdbusplus/bus.hpp>
 
 #include <string>
-#include <tuple>
 #include <vector>
 
 namespace version
 {
-namespace internal
-{
-// PsuInfo contains the device path, pmbus read type, and the version string
-using PsuVersionInfo =
-    std::tuple<std::string, phosphor::pmbus::Type, std::string>;
-
-/**
- * @brief Get PSU version information
- *
- * @param[in] psuInventoryPath - The PSU inventory path.
- *
- * @return tuple - device path, pmbus read type and PSU version
- */
-PsuVersionInfo getVersionInfo(const std::string& psuInventoryPath);
-
-/**
- * @brief Get firmware latest version
- *
- * @param[in] versions - String of versions
- *
- * @return version - latest firmware level
- */
-std::string getLatestDefault(const std::vector<std::string>& versions);
-
-} // namespace internal
-
 /**
  * Get the software version of the PSU using sysfs
  *
- * @param[in] bus - Systemd bus connection
- * @param[in] psuInventoryPath - The inventory path of the PSU
+ * @param[in] bus - D-Bus connection
+ * @param[in] psuInventoryPath - PSU D-Bus inventory path
  *
- * @return The version of the PSU
+ * @return PSU version, or "" if version could not be found
  */
 std::string getVersion(sdbusplus::bus_t& bus,
                        const std::string& psuInventoryPath);
 
 /**
- * Get the software version of the PSU using psu.json
- *
- * @param[in] psuInventoryPath - The inventory path of the PSU
- *
- * @return The version of the PSU
- */
-std::string getVersion(const std::string& psuInventoryPath);
-
-/**
  * Get the latest version from a list of versions
  *
  * @param[in] versions - The list of PSU version strings