entity-manager: fixes for logDeviceAdded/Removed

Follow-up patch to fix issues found in comments of [1].

- Use explicit type rather than 'auto' for local variable
- Setup a return variable to avoid duplicate initial value "Unknown"
- Fix string value read to avoid uncaught exception
- Remove unused boost include
- Add unit tests

Tested: Unit tests pass.

References:
[1] https://gerrit.openbmc.org/c/openbmc/entity-manager/+/84340

Change-Id: I3d5540860e8ef8e590bc2685ce559c53dc8452b5
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/src/entity_manager/log_device_inventory.hpp b/src/entity_manager/log_device_inventory.hpp
index 9ebf040..4232f14 100644
--- a/src/entity_manager/log_device_inventory.hpp
+++ b/src/entity_manager/log_device_inventory.hpp
@@ -5,6 +5,16 @@
 
 #include <nlohmann/json.hpp>
 
+struct InvAddRemoveInfo
+{
+    std::string model = "Unknown";
+    std::string type = "Unknown";
+    std::string sn = "Unknown";
+    std::string name = "Unknown";
+};
+
 void logDeviceAdded(const nlohmann::json& record);
 
 void logDeviceRemoved(const nlohmann::json& record);
+
+InvAddRemoveInfo queryInvInfo(const nlohmann::json& record);