fix: database connection handling and KPI database format
- KPIEntity no longer depends on an enum value from the SPHA library. This change should result in a more robust and predictable code behavior against changes in the library.
- database operations now take a dispatcher as an input to enable automated testing