regulators: Add configure support to Device class

Implemented the configure() method in the Device class.  This method
applies any configuration changes that are defined for the device.  Also
configures all rails within the device.

Also added a missing #include to rail_tests.cpp.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I2faceb7d968b6bb01ee7e1116367afee5864ca28
diff --git a/phosphor-regulators/src/device.cpp b/phosphor-regulators/src/device.cpp
index 3e7d5a4..dd662c9 100644
--- a/phosphor-regulators/src/device.cpp
+++ b/phosphor-regulators/src/device.cpp
@@ -16,6 +16,9 @@
 
 #include "device.hpp"
 
+#include "chassis.hpp"
+#include "system.hpp"
+
 namespace phosphor::power::regulators
 {
 
@@ -31,4 +34,19 @@
     }
 }
 
+void Device::configure(System& system, Chassis& chassis)
+{
+    // If configuration changes are defined for this device, apply them
+    if (configuration)
+    {
+        configuration->execute(system, chassis, *this);
+    }
+
+    // Configure rails
+    for (std::unique_ptr<Rail>& rail : rails)
+    {
+        rail->configure(system, chassis, *this);
+    }
+}
+
 } // namespace phosphor::power::regulators