fast-encoding: implement fast encoding for Name, NameComponent and FibManagementOptions, including test case.

refs: #1172

Change-Id: I80fa7cfbe7f9dee3c439febcc8f800c63a31eac3
diff --git a/src/encoding/buffer.hpp b/src/encoding/buffer.hpp
index 1dc8f7e..9742512 100644
--- a/src/encoding/buffer.hpp
+++ b/src/encoding/buffer.hpp
@@ -42,6 +42,15 @@
   }
 
   /**
+   * @brief Creates a buffer with pre-allocated size
+   * @param size size of the buffer to be allocated
+   */
+  Buffer (size_t size)
+    : std::vector<uint8_t> (size, 0)
+  {
+  }
+
+  /**
    * @brief Create a buffer by copying the supplied data from a const buffer
    * @param buf const pointer to buffer
    * @param length length of the buffer to copy