Add x509 utils

This change moves some existing static functions in the Certificate
class and x509 related routines into a separate library. These functions
will be used in future Authorities List related functions.

This change also reduces the number of times Certificate class reads PEM
files by passing cert via X509 pointers rather than Certificate paths.

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: Ieb268ee051c3597f2add732902eb0461375a4c3f
diff --git a/meson.build b/meson.build
index e0893a6..68c56c6 100644
--- a/meson.build
+++ b/meson.build
@@ -66,6 +66,7 @@
         'certs_manager.cpp',
         'csr.cpp',
         'watch.cpp',
+        'x509_utils.cpp',
     ],
     dependencies: phosphor_certificate_deps,
 )