Refactor and modernize namespace declarations

 * Completely remove inline namespace v2
 * Flatten some unnecessarily deep namespace nesting
 * Move DummyClientFace, Segmenter, SegmentFetcher to namespace ndn
 * Move all unit tests to namespace ndn::tests

Change-Id: I8bcfcf9fd669936a3277d2d5d505f765b4b05742
diff --git a/docs/code-style.rst b/docs/code-style.rst
index 2baac21..738e20c 100644
--- a/docs/code-style.rst
+++ b/docs/code-style.rst
@@ -3,11 +3,11 @@
 
 Based on
 
-* "C++ Programming Style Guidelines" by Geotechnical Software Services, Copyright © 1996 – 2011.
-  The original document is available at `<http://geosoft.no/development/cppstyle.html>`_
+* "C++ Programming Style Guidelines" by Geotechnical Software Services, Copyright © 1996-2011.
+  The original document is available at `<http://geosoft.no/development/cppstyle.html>`__
 
 * NDN Platform "C++, C, C#, Java and JavaScript Code Guidelines".
-  The original document is available at `<https://named-data.net/codebase/platform/documentation/ndn-platform-development-guidelines/cpp-code-guidelines/>`_
+  The original document is available at `<https://named-data.net/codebase/platform/documentation/ndn-platform-development-guidelines/cpp-code-guidelines/>`__
 
 1. Code layout
 --------------
@@ -52,11 +52,11 @@
 
         } // namespace example
 
-    Note that code inside namespace is **not** indented. Avoid the following:
+    Note that code inside the namespace is **not** indented. Avoid the following:
 
     .. code-block:: c++
 
-        // NOT
+        // WRONG
         //
         // namespace example {
         //
@@ -479,13 +479,11 @@
 
     .. code-block:: c++
 
-        namespace model {
-        namespace analyzer {
+        namespace model::analyzer {
 
         ...
 
-        } // namespace analyzer
-        } // namespace model
+        } // namespace model::analyzer
 
 2.7. Names representing generic template types should be a single uppercase letter.
 
diff --git a/docs/doxygen.conf.in b/docs/doxygen.conf.in
index c48312c..afcd331 100644
--- a/docs/doxygen.conf.in
+++ b/docs/doxygen.conf.in
@@ -1739,16 +1739,6 @@
 
 LATEX_HIDE_INDICES     = NO
 
-# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
-# code with syntax highlighting in the LaTeX output.
-#
-# Note that which sources are shown also depends on other settings such as
-# SOURCE_BROWSER.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_SOURCE_CODE      = NO
-
 # The LATEX_BIB_STYLE tag can be used to specify the style to use for the
 # bibliography, e.g. plainnat, or ieeetr. See
 # http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
@@ -1821,16 +1811,6 @@
 
 RTF_EXTENSIONS_FILE    =
 
-# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
-# with syntax highlighting in the RTF output.
-#
-# Note that which sources are shown also depends on other settings such as
-# SOURCE_BROWSER.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_RTF is set to YES.
-
-RTF_SOURCE_CODE        = NO
-
 #---------------------------------------------------------------------------
 # Configuration options related to the man page output
 #---------------------------------------------------------------------------
@@ -1920,15 +1900,6 @@
 
 DOCBOOK_OUTPUT         = docbook
 
-# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
-# program listings (including syntax highlighting and cross-referencing
-# information) to the DOCBOOK output. Note that enabling this will significantly
-# increase the size of the DOCBOOK output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
-
-DOCBOOK_PROGRAMLISTING = NO
-
 #---------------------------------------------------------------------------
 # Configuration options for the AutoGen Definitions output
 #---------------------------------------------------------------------------
@@ -2119,15 +2090,6 @@
 # Configuration options related to the dot tool
 #---------------------------------------------------------------------------
 
-# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
-# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
-# NO turns the diagrams off. Note that this option also works with HAVE_DOT
-# disabled, but it is recommended to install and use dot, since it yields more
-# powerful graphs.
-# The default value is: YES.
-
-CLASS_DIAGRAMS         = YES
-
 # You can include diagrams made with dia in doxygen documentation. Doxygen will
 # then run dia to produce the diagram and insert it in the documentation. The
 # DIA_PATH tag allows you to specify the directory where the dia binary resides.
diff --git a/docs/release-notes/release-notes-0.2.0.rst b/docs/release-notes/release-notes-0.2.0.rst
index 5d804bf..89d7c08 100644
--- a/docs/release-notes/release-notes-0.2.0.rst
+++ b/docs/release-notes/release-notes-0.2.0.rst
@@ -66,7 +66,7 @@
   + Introduce ``util::EventEmitter``, :ndn-cxx:`util::NotificationSubscriber`,
     :ndn-cxx:`util::NotificationStream`, and :ndn-cxx:`nfd::FaceMonitor` utility classes
 
-  + Introduce :ndn-cxx:`util::SegmentFetcher` helper class to fetch multi-segmented data
+  + Introduce :ndn-cxx:`SegmentFetcher` helper class to fetch multi-segmented data
     (:issue:`1879`)
 
 - **Build**
diff --git a/docs/release-notes/release-notes-0.5.1.rst b/docs/release-notes/release-notes-0.5.1.rst
index 8108300..2ba1ec1 100644
--- a/docs/release-notes/release-notes-0.5.1.rst
+++ b/docs/release-notes/release-notes-0.5.1.rst
@@ -63,27 +63,27 @@
 Deprecated
 ^^^^^^^^^^
 
-- Old security framework.  All old security framework classes are moved to
+- Old security framework.  All old security framework classes are moved to the
   ``ndn::security::v1`` namespace in this release and will be removed in the next release.
 
-  * ``v1::KeyChain``, use :ndn-cxx:`v2::KeyChain` instead
+  * ``v1::KeyChain``; use ``v2::KeyChain`` instead.
 
   * ``v1::Validator`` interface and all implementations of this interface (``ValidatorRegex``,
-    ``ValidatorConfig``, ``ValidatorNull``).  Use :ndn-cxx:`v2::Validator` and the
-    corresponding implementations of :ndn-cxx:`ValidationPolicy` interfaces (will be introduced
-    before 0.6.0 release).
+    ``ValidatorConfig``, ``ValidatorNull``).  Use ``v2::Validator`` and the corresponding
+    implementations of :ndn-cxx:`ValidationPolicy` interfaces (will be introduced before
+    the 0.6.0 release).
 
   * ``v1::SecPublicInfo`` and its implementation (``SecPublicInfoSqlite``), ``SecTpm`` and its
     implementations (``SecTpmFile``, ``SecTpmOsx``).  These classes are internal implementation
-    and not intended to be used without ``v1::KeyChain``.  :ndn-cxx:`v2::KeyChain` internally
-    uses the newly introduced :ndn-cxx:`Pib` and :ndn-cxx:`Tpm` interfaces with their
-    corresponding implementations.
+    and not intended to be used without ``v1::KeyChain``.  ``v2::KeyChain`` internally uses
+    the newly introduced :ndn-cxx:`Pib` and :ndn-cxx:`Tpm` interfaces with their corresponding
+    implementations.
 
   * ``v1::Certificate``, ``v1::IdentityCertificate``, ``v1::CertificateExtension``,
-    ``v1::CertificateSubjectDescription``, use :ndn-cxx:`v2::Certificate` and
-    :ndn-cxx:`AdditionalDescription`
+    ``v1::CertificateSubjectDescription``; use ``v2::Certificate`` and ``AdditionalDescription``
+    instead.
 
-  * ``v1::SecuredBag``, use ``v2::SafeBag`` instead
+  * ``v1::SecuredBag``; use :ndn-cxx:`SafeBag` instead.
 
 - Constant ``io::BASE_64``, use ``io::BASE64`` instead (:issue:`3741`)
 
diff --git a/docs/release-notes/release-notes-0.6.0.rst b/docs/release-notes/release-notes-0.6.0.rst
index 904eb1d..f5d7766 100644
--- a/docs/release-notes/release-notes-0.6.0.rst
+++ b/docs/release-notes/release-notes-0.6.0.rst
@@ -102,23 +102,23 @@
 
 - Old security framework.
 
-  * ``v1::KeyChain``, use :ndn-cxx:`v2::KeyChain` instead
+  * ``v1::KeyChain``; use :ndn-cxx:`KeyChain` instead.
 
   * ``v1::Validator`` interface and ``ValidatorRegex`` implementation of this
     interface. ``ValidatorConfig``, ``ValidatorNull`` implementation refactored to be based on
     the new validation framework.
 
   * ``v1::SecPublicInfo`` and its implementation (``SecPublicInfoSqlite``), ``SecTpm`` and its
-    implementations (``SecTpmFile``, ``SecTpmOsx``).  These classes are internal implementation
-    and not intended to be used without ``v1::KeyChain``.  :ndn-cxx:`v2::KeyChain` internally
+    implementations (``SecTpmFile``, ``SecTpmOsx``). These classes are internal implementation
+    and not intended to be used without ``v1::KeyChain``. The new :ndn-cxx:`KeyChain` internally
     uses the newly introduced :ndn-cxx:`Pib` and :ndn-cxx:`Tpm` interfaces with their
     corresponding implementations.
 
   * ``v1::Certificate``, ``v1::IdentityCertificate``, ``v1::CertificateExtension``,
-    ``v1::CertificateSubjectDescription``, use :ndn-cxx:`v2::Certificate` and
-    :ndn-cxx:`AdditionalDescription`
+    ``v1::CertificateSubjectDescription``; use the new :ndn-cxx:`Certificate` and
+    :ndn-cxx:`AdditionalDescription` instead.
 
-  * ``v1::SecuredBag``, use ``v2::SafeBag`` instead
+  * ``v1::SecuredBag``; use :ndn-cxx:`SafeBag` instead.
 
 - Constant ``io::BASE_64``, use ``io::BASE64`` instead (:issue:`3741`)