encoding: Fixing Block (and as a result Name) encoding bugs

As of this commit, all non-const operations on Block will call resetWire
to remove all references to the wire, so it will be recreated next time
"encode" method is called.  Also, all getter methods now have only const
versions and non-const access to the internal data structure is
prohibited.

Change-Id: If4b485dd62541d9d4d168a44490068e4deff56c1
diff --git a/src/management/ndnd-status-response.hpp b/src/management/ndnd-status-response.hpp
index 1543bed..74e15fe 100644
--- a/src/management/ndnd-status-response.hpp
+++ b/src/management/ndnd-status-response.hpp
@@ -106,8 +106,8 @@
 
   code_ = readNonNegativeInteger(wire_.get(Tlv::FaceManagement::StatusCode));
 
-  Block::element_iterator val = wire_.find(Tlv::FaceManagement::StatusText);
-  if (val != wire_.getAll().end())
+  Block::element_const_iterator val = wire_.find(Tlv::FaceManagement::StatusText);
+  if (val != wire_.elements_end())
     {
       info_.assign(reinterpret_cast<const char*>(val->value()), val->value_size());
     }