encoding: Fixing bugs in EncodingBlock and Block

Several Block constructors incorrectly initialized value boundaries.

Change-Id: I0d8a4fe73cc24530245862e0428e617437078bf0
refs: #1256, #1257
diff --git a/src/encoding/block.hpp b/src/encoding/block.hpp
index 2afd154..a2f19be 100644
--- a/src/encoding/block.hpp
+++ b/src/encoding/block.hpp
@@ -17,6 +17,9 @@
 
 namespace ndn {
 
+template<bool> class EncodingImpl;
+typedef EncodingImpl<true> EncodingBuffer;
+
 /**
  * @brief Class representing wire element of the NDN packet
  */
@@ -223,6 +226,7 @@
   Buffer::const_iterator m_value_end;
 
   mutable element_container m_subBlocks;
+  friend class EncodingImpl<true>;
 };
 
 ////////////////////////////////////////////////////////////////////////////////