encoding: Refactoring EncodingBuffer

Breaks: nfd:commit:c0273e3505ac2ccf843401be77a513d8eb663127
Breaks: ChronoSync:commit:e042f83a1df184a8e7a90ef00034d11026891cd1

Change-Id: I8275c6276c5ecfa280f87f584189907521febf5f
Refs: #2494, #2490
diff --git a/src/name.hpp b/src/name.hpp
index a9716e9..bd6e02b 100644
--- a/src/name.hpp
+++ b/src/name.hpp
@@ -114,9 +114,9 @@
   /**
    * @brief Fast encoding or block size estimation
    */
-  template<bool T>
+  template<encoding::Tag TAG>
   size_t
-  wireEncode(EncodingImpl<T>& block) const;
+  wireEncode(EncodingImpl<TAG>& block) const;
 
   const Block&
   wireEncode() const;
@@ -159,14 +159,19 @@
   }
 
   /**
-   * Append a new component, copying from value of length valueLength.
+   * @brief Append a new component, copying from value frome the range [@p first, @p last) of bytes
+   * @param first     Iterator pointing to the beginning of the buffer
+   * @param last      Iterator pointing to the ending of the buffer
+   * @tparam Iterator iterator type satisfying at least InputIterator concept.  Implementation
+   *                  is more optimal when the iterator type satisfies RandomAccessIterator concept.
+   *                  It is required that sizeof(std::iterator_traits<Iterator>::value_type) == 1.
    * @return This name so that you can chain calls to append.
    */
-  template<class InputIterator>
+  template<class Iterator>
   Name&
-  append(InputIterator begin, InputIterator end)
+  append(Iterator first, Iterator last)
   {
-    m_nameBlock.push_back(Component(begin, end));
+    m_nameBlock.push_back(Component(first, last));
     return *this;
   }