More PDR refactor

- PDRs can be created not just by the platform monitoring and control
  handlers, but by other handlers (eg FRU) as well.
- For this purpose, create the PDR repo in the pldm daemon, and pass it
  to the handlers. This change warranted some refactor.

Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Change-Id: I4e789da9bae99dee1b535d92ce98ae5bb8eed62b
Signed-off-by: George Liu <liuxiwei@inspur.com>
diff --git a/libpldmresponder/pdr_utils.cpp b/libpldmresponder/pdr_utils.cpp
index 850dbcb..9a68ca9 100644
--- a/libpldmresponder/pdr_utils.cpp
+++ b/libpldmresponder/pdr_utils.cpp
@@ -9,7 +9,7 @@
 namespace pdr_utils
 {
 
-const pldm_pdr* Repo::getPdr()
+pldm_pdr* Repo::getPdr() const
 {
     return repo;
 }
@@ -50,7 +50,7 @@
     return record;
 }
 
-uint32_t Repo::getRecordHandle(const pldm_pdr_record* record)
+uint32_t Repo::getRecordHandle(const pldm_pdr_record* record) const
 {
     return pldm_pdr_get_record_handle(getPdr(), record);
 }