sched-host-tran: code refactor

Move setProperty() and getService() to utils.cpp as public functions
which can be reused.

Change-Id: If62b67978349a80f8bd2026b5a749d5dedc556de
Signed-off-by: Carol Wang <wangkair@cn.ibm.com>
diff --git a/meson.build b/meson.build
index fb24d76..a517f77 100644
--- a/meson.build
+++ b/meson.build
@@ -116,6 +116,7 @@
 executable('phosphor-scheduled-host-transition',
             'scheduled_host_transition_main.cpp',
             'scheduled_host_transition.cpp',
+            'utils.cpp',
             dependencies: [
             sdbusplus, sdeventplus, phosphorlogging
             ],
@@ -179,6 +180,7 @@
       executable('test_scheduled_host_transition',
           './test/test_scheduled_host_transition.cpp',
           'scheduled_host_transition.cpp',
+          'utils.cpp',
           dependencies: [
               gtest, gmock, sdbusplus, sdeventplus, phosphorlogging,
           ],