monitor: Create PowerOffRules class

This class contains a PowerOffCause and a PowerOffAction.  It provides a
check() method that takes the FanHealth map which it then checks against
the cause.  If the cause is satisfied, it then starts the power off
action.  It provides a cancel method that will force cancel a running
action in the case that the object owner detects a system power off and
so doesn't need to run this power off anymore.

The class's configuration data is read from the JSON config file.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I5c0c168591d6d62c894c4d036ec762797fd759af
diff --git a/monitor/test/mock_power_interface.hpp b/monitor/test/mock_power_interface.hpp
new file mode 100644
index 0000000..c070182
--- /dev/null
+++ b/monitor/test/mock_power_interface.hpp
@@ -0,0 +1,17 @@
+#pragma once
+
+#include "../power_interface.hpp"
+
+#include <gmock/gmock.h>
+
+namespace phosphor::fan::monitor
+{
+
+class MockPowerInterface : public PowerInterfaceBase
+{
+  public:
+    MOCK_METHOD(void, softPowerOff, (), (override));
+    MOCK_METHOD(void, hardPowerOff, (), (override));
+};
+
+} // namespace phosphor::fan::monitor