regulators: Add toString() method to Action class

Add a toString() method to the Action class and all child classes.

This method returns a string description of the action.  The description
will be used in journal entries and error logs when an action fails
(such as due to an I2C error).

Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I083496d23bf9c3df5be1b082650a9def24be1b00
diff --git a/phosphor-regulators/test/actions/set_device_action_tests.cpp b/phosphor-regulators/test/actions/set_device_action_tests.cpp
index 1aa6cfc..c39b9b0 100644
--- a/phosphor-regulators/test/actions/set_device_action_tests.cpp
+++ b/phosphor-regulators/test/actions/set_device_action_tests.cpp
@@ -77,3 +77,9 @@
     SetDeviceAction action{"io_expander_0"};
     EXPECT_EQ(action.getDeviceID(), "io_expander_0");
 }
+
+TEST(SetDeviceActionTests, ToString)
+{
+    SetDeviceAction action{"regulator1"};
+    EXPECT_EQ(action.toString(), "set_device: regulator1");
+}