regulators: Build IDMap for system

The IDMap class is used to map string IDs to the corresponding C++
Device, Rail, and Rule objects.

The IDMap class is complete and tested, but it was not previously being
populated except in testcases.

Add new methods to the System, Chassis, and Device classes to populate
the IDMap with all the ID -> object mappings in the system.

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I80f39b663b011ca643c91f7281ff50c956631331
diff --git a/phosphor-regulators/src/system.hpp b/phosphor-regulators/src/system.hpp
index 3256c8d..b0346ac 100644
--- a/phosphor-regulators/src/system.hpp
+++ b/phosphor-regulators/src/system.hpp
@@ -56,6 +56,7 @@
         rules{std::move(rules)},
         chassis{std::move(chassis)}
     {
+        buildIDMap();
     }
 
     /**
@@ -93,6 +94,13 @@
 
   private:
     /**
+     * Builds the IDMap for the system.
+     *
+     * Adds the Device, Rail, and Rule objects in the system to the map.
+     */
+    void buildIDMap();
+
+    /**
      * Rules used to monitor and control regulators in the system.
      */
     std::vector<std::unique_ptr<Rule>> rules{};