PowerStatusMonitor: create DBus match in ctor

On request [1], create this change to create the DBus match for our
power status monitor in its constructor.

We get rid of the invalid state of the match not existing and can drop a
check for it.

We can also drop a call in 'main' function previously used to initialize
the match. The public API of this class is simplified.

Tested: Inspection only.

References:
[1] https://gerrit.openbmc.org/c/openbmc/entity-manager/+/81483/comment/858d95be_e2f9f6b8/

Change-Id: Ib05941a90ba2520b25e2c2b1e9a1e325caa722ae
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/src/entity_manager/power_status_monitor.hpp b/src/entity_manager/power_status_monitor.hpp
index 0955607..b6fd272 100644
--- a/src/entity_manager/power_status_monitor.hpp
+++ b/src/entity_manager/power_status_monitor.hpp
@@ -9,15 +9,16 @@
 class PowerStatusMonitor
 {
   public:
-    bool isPowerOn();
-    void setupPowerMatch(
-        const std::shared_ptr<sdbusplus::asio::connection>& conn);
+    explicit PowerStatusMonitor(sdbusplus::asio::connection& conn);
+
+    bool isPowerOn() const;
 
   private:
     void handlePowerMatch(sdbusplus::message_t& message);
+    void getInitialPowerStatus(sdbusplus::asio::connection& conn);
 
     bool powerStatusOn = false;
-    std::unique_ptr<sdbusplus::bus::match_t> powerMatch = nullptr;
+    sdbusplus::bus::match_t powerMatch;
 };
 
 } // namespace power