Migrate to C++17 and refactor

Change-Id: I53407266939258990a1c3a9363c3ebe9ea113fd2
diff --git a/src/detail/ndncert-common.hpp b/src/detail/ndncert-common.hpp
index d9863a5..5549550 100644
--- a/src/detail/ndncert-common.hpp
+++ b/src/detail/ndncert-common.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2017-2021, Regents of the University of California.
+ * Copyright (c) 2017-2022, Regents of the University of California.
  *
  * This file is part of ndncert, a certificate management system based on NDN.
  *
@@ -37,8 +37,11 @@
 
 #include <cstddef>
 #include <cstdint>
+#include <memory>
+#include <optional>
 #include <string>
 #include <tuple>
+#include <vector>
 
 #include <ndn-cxx/data.hpp>
 #include <ndn-cxx/encoding/block.hpp>
@@ -48,7 +51,6 @@
 #include <ndn-cxx/security/certificate.hpp>
 #include <ndn-cxx/util/exception.hpp>
 #include <ndn-cxx/util/logger.hpp>
-#include <ndn-cxx/util/optional.hpp>
 #include <ndn-cxx/util/time.hpp>
 
 #include <boost/algorithm/string.hpp>
@@ -65,9 +67,6 @@
 using ndn::SignatureInfo;
 using ndn::security::Certificate;
 
-using ndn::optional;
-using ndn::nullopt;
-
 namespace time = ndn::time;
 using namespace ndn::time_literals;
 using namespace std::string_literals;