util: Improvements of string helpers

Improvements include:
- test cases for every string helper
- a new `printHex` helper to output hex conversion directly to std::ostream
- new `toHex` and `printHex` helpers that accept Buffer as input parameter
- a new `fromHex` helper to convert the supplied string to shared_ptr<const Buffer>
- replaced uses of CryptoPP routines with `toHex` and `fromHex` helpers where applicable

Change-Id: I092c9fa8fd21c413b53ea5624b82f769287bb42c
Refs: #3006
diff --git a/src/util/digest.cpp b/src/util/digest.cpp
index 664df2b..d5bb312 100644
--- a/src/util/digest.cpp
+++ b/src/util/digest.cpp
@@ -20,6 +20,7 @@
  */
 
 #include "digest.hpp"
+#include "string-helper.hpp"
 #include <sstream>
 
 namespace ndn {
@@ -158,11 +159,8 @@
 std::ostream&
 operator<<(std::ostream& os, Digest<Hash>& digest)
 {
-  using namespace CryptoPP;
-
-  std::string output;
   ConstBufferPtr buffer = digest.computeDigest();
-  StringSource(buffer->buf(), buffer->size(), true, new HexEncoder(new FileSink(os)));
+  printHex(os, buffer->buf(), buffer->size());
 
   return os;
 }