Support reading VERSION_ID without quotes

The VERSION_ID value in /etc/os-release recently had its surrounding
quotation marks removed.  Update the code to be able to read values out
of /etc/os-release either with or without quotes, and make it a utility
function so that it can be used in multiple places.

Props to the phosphor-bmc-code-mgmt repo for the elegant implementation.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I348625ba49214ab2977d9e70a4337299bef5ed3a

Change-Id: I9d201954a8116dfda32d096a347e150d93fbfb46
diff --git a/util.hpp b/util.hpp
new file mode 100644
index 0000000..c348916
--- /dev/null
+++ b/util.hpp
@@ -0,0 +1,19 @@
+#pragma once
+
+#include <fstream>
+#include <optional>
+#include <string>
+
+namespace phosphor::logging::util
+{
+
+/**
+ * @brief Return a value found in the /etc/os-release file
+ *
+ * @param[in] key - The key name, like "VERSION"
+ *
+ * @return std::optional<std::string> - The value
+ */
+std::optional<std::string> getOSReleaseValue(const std::string& key);
+
+} // namespace phosphor::logging::util