pldmd: move to libpldm instance ID alloc/free

Refactor the dbus_api::Requester class to be implemented in terms of
libpldm's instance ID database. To make that easier to deal with we
introduce a light-weight RAII C++ binding along with a helper class for
unit tests.

Change-Id: Ia03de8245dfb114e6266ba36dcf26ca4398a4ce0
Signed-off-by: Rashmica Gupta <rashmica@linux.ibm.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/requester/test/meson.build b/requester/test/meson.build
index 1e63997..b7a929f 100644
--- a/requester/test/meson.build
+++ b/requester/test/meson.build
@@ -1,10 +1,3 @@
-requester_inc = include_directories('../../')
-test_src = declare_dependency(
-          sources: [
-            '../../pldmd/dbus_impl_requester.cpp',
-            '../../pldmd/instance_id.cpp'],
-          include_directories:requester_inc)
-
 tests = [
   'handler_test',
   'request_test',
@@ -13,6 +6,7 @@
 foreach t : tests
   test(t, executable(t.underscorify(), t + '.cpp',
                      implicit_include_directories: false,
+                     include_directories: [ '../../', '../../pldmd' ],
                      link_args: dynamic_linker,
                      build_rpath: get_option('oe-sdk').enabled() ? rpath : '',
                      dependencies: [
@@ -24,6 +18,6 @@
                          phosphor_logging_dep,
                          sdbusplus,
                          sdeventplus,
-                         test_src]),
+                    ]),
        workdir: meson.current_source_dir())
 endforeach