regulators: Clear cached hardware data during boot

Clear cached data about hardware devices when the system is powering on
(booting).

While the system was powered off, hardware devices containing voltage
regulators could have been added, removed, or replaced.  Cached hardware
data might now be invalid.

Tested:
* Ran automated test cases
* Verified that cached data is cleared without errors during boot
  * When config file was found and loaded
  * When no config file was found

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: Ief45fe32ddcb122847d201e89ca1267526a87e3c
diff --git a/phosphor-regulators/src/device.cpp b/phosphor-regulators/src/device.cpp
index 062ff27..1290077 100644
--- a/phosphor-regulators/src/device.cpp
+++ b/phosphor-regulators/src/device.cpp
@@ -37,6 +37,16 @@
     }
 }
 
+void Device::clearCache()
+{
+    // If presence detection is defined for this device
+    if (presenceDetection)
+    {
+        // Clear cached presence data
+        presenceDetection->clearCache();
+    }
+}
+
 void Device::close(Services& services)
 {
     try