clean up using directives and type alias

Most C++ style guides try to avoid using directives in headers and also
suggest using type alias carefully, according to which, this change does
the following clean up:

1. used Enum class to represent Certificate type
2. removed all using directives: e.g. the phosphor logging namespace;
instead, this change uses using declarations
3. removed unnecessary type alias; in existing codes, we only support
strings as types of UnitToRestart, InstallPath, UploadPath, etc; this
change uses std::string directly
4. moved all alias outside any class scope into source files or an
internal namespace
5. renamed types, constants, classes as per OpenBMC style guide
6. fixed all compilation errors and some warnings after the refactoring;
built with both Clang & GCC

Reference:
https://docs.microsoft.com/en-us/cpp/cpp/header-files-cpp?view=msvc-170#what-to-put-in-a-header-file
https://google.github.io/styleguide/cppguide.html#Namespaces

Tested:
Unit tests

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I58e026934a4e969f4d8877801c8f3c671990468a
diff --git a/test/ca_certs_manager_test.cpp b/test/ca_certs_manager_test.cpp
index 5bdad56..fab3c54 100644
--- a/test/ca_certs_manager_test.cpp
+++ b/test/ca_certs_manager_test.cpp
@@ -20,9 +20,8 @@
 class MockCACertMgr : public CACertMgr
 {
   public:
-    MockCACertMgr(sdbusplus::bus::bus& bus, sdeventplus::Event& event,
-                  const char* path) :
-        CACertMgr(bus, event, path)
+    MockCACertMgr(sdbusplus::bus::bus& bus, const char* path) :
+        CACertMgr(bus, path)
     {
     }
 
@@ -67,7 +66,7 @@
     std::string objPath = "/xyz/openbmc_project/certs/ca";
     auto event = sdeventplus::Event::get_default();
     bus.attach_event(event.get(), SD_EVENT_PRIORITY_NORMAL);
-    MockCACertMgr manager(bus, event, objPath.c_str());
+    MockCACertMgr manager(bus, objPath.c_str());
 
     std::string csrString = "csr string";
     EXPECT_NO_THROW(objPath = manager.createCSRObject(csrString));
@@ -80,7 +79,7 @@
     std::string objPath = "/xyz/openbmc_project/certs/ca";
     auto event = sdeventplus::Event::get_default();
     bus.attach_event(event.get(), SD_EVENT_PRIORITY_NORMAL);
-    MockCACertMgr manager(bus, event, objPath.c_str());
+    MockCACertMgr manager(bus, objPath.c_str());
 
     std::string csrString(4097, 'C');
 
@@ -93,7 +92,7 @@
     auto event = sdeventplus::Event::get_default();
 
     bus.attach_event(event.get(), SD_EVENT_PRIORITY_NORMAL);
-    MockCACertMgr manager(bus, event, objPath.c_str());
+    MockCACertMgr manager(bus, objPath.c_str());
 
     std::string csrString = "csr string";
 
@@ -111,7 +110,7 @@
     std::string objPath = "/xyz/openbmc_project/certs/ca";
     auto event = sdeventplus::Event::get_default();
     bus.attach_event(event.get(), SD_EVENT_PRIORITY_NORMAL);
-    MockCACertMgr manager(bus, event, objPath.c_str());
+    MockCACertMgr manager(bus, objPath.c_str());
 
     std::string csrString = "csr string";
     std::string entryPath = manager.createCSRObject(csrString);