Refactor and modernize namespace declarations

Move all unit tests to namespace nfd::tests

Delete unused header core/algorithm.hpp

Change-Id: I5591f0c5f3bb5db67f8b45fae95471f8a555ca68
diff --git a/daemon/mgmt/general-config-section.cpp b/daemon/mgmt/general-config-section.cpp
index de9c611..daaa103 100644
--- a/daemon/mgmt/general-config-section.cpp
+++ b/daemon/mgmt/general-config-section.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -26,8 +26,7 @@
 #include "general-config-section.hpp"
 #include "common/privilege-helper.hpp"
 
-namespace nfd {
-namespace general {
+namespace nfd::general {
 
 static void
 onConfig(const ConfigSection& section, bool isDryRun, const std::string&)
@@ -75,5 +74,4 @@
   config.addSectionHandler("general", &onConfig);
 }
 
-} // namespace general
-} // namespace nfd
+} // namespace nfd::general
diff --git a/daemon/mgmt/general-config-section.hpp b/daemon/mgmt/general-config-section.hpp
index cd9089d..6c822d9 100644
--- a/daemon/mgmt/general-config-section.hpp
+++ b/daemon/mgmt/general-config-section.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -28,13 +28,11 @@
 
 #include "common/config-file.hpp"
 
-namespace nfd {
-namespace general {
+namespace nfd::general {
 
 void
 setConfigFile(ConfigFile& config);
 
-} // namespace general
-} // namespace nfd
+} // namespace nfd::general
 
 #endif // NFD_DAEMON_MGMT_GENERAL_CONFIG_SECTION_HPP
diff --git a/daemon/mgmt/log-config-section.cpp b/daemon/mgmt/log-config-section.cpp
index 9d8168c..9408812 100644
--- a/daemon/mgmt/log-config-section.cpp
+++ b/daemon/mgmt/log-config-section.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -28,8 +28,7 @@
 #include <ndn-cxx/util/logger.hpp>
 #include <ndn-cxx/util/logging.hpp>
 
-namespace nfd {
-namespace log {
+namespace nfd::log {
 
 static ndn::util::LogLevel
 parseLogLevel(const ConfigSection& item, const std::string& key)
@@ -92,5 +91,4 @@
   config.addSectionHandler("log", &onConfig);
 }
 
-} // namespace log
-} // namespace nfd
+} // namespace nfd::log
diff --git a/daemon/mgmt/log-config-section.hpp b/daemon/mgmt/log-config-section.hpp
index e7e4022..526b66d 100644
--- a/daemon/mgmt/log-config-section.hpp
+++ b/daemon/mgmt/log-config-section.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -28,13 +28,11 @@
 
 #include "common/config-file.hpp"
 
-namespace nfd {
-namespace log {
+namespace nfd::log {
 
 void
 setConfigFile(ConfigFile& config);
 
-} // namespace log
-} // namespace nfd
+} // namespace nfd::log
 
 #endif // NFD_DAEMON_MGMT_LOG_CONFIG_SECTION_HPP