exceptions: Make Tlv::Error a base class for all packet-processing exceptions

This commit also includes a number of code style fixes.

Change-Id: I44f83915e733b43d5f43b4266902c8262e928d91
Refs: #1528
diff --git a/src/encoding/block.hpp b/src/encoding/block.hpp
index 8079531..6777f77 100644
--- a/src/encoding/block.hpp
+++ b/src/encoding/block.hpp
@@ -30,7 +30,7 @@
   typedef element_container::iterator        element_iterator;
   typedef element_container::const_iterator  element_const_iterator;
 
-  /// @brief Error that can be thrown from the block
+  /// @brief Error that can be thrown from Block
   class Error : public Tlv::Error
   {
   public:
@@ -53,7 +53,8 @@
   Block(const EncodingBuffer& buffer);
 
   /**
-   * @brief A helper version of a constructor to create Block from the raw buffer (type and value-length parsing)
+   * @brief A helper version of a constructor to create Block from the raw buffer (type
+   * and value-length parsing)
    *
    * This constructor provides ability of implicit conversion from ConstBufferPtr to Block
    */
@@ -70,7 +71,8 @@
         bool verifyLength = true);
 
   /**
-   * @brief A helper version of a constructor to create Block from the raw buffer (type and value-length parsing)
+   * @brief A helper version of a constructor to create Block from the raw buffer (type
+   * and value-length parsing)
    */
   Block(const uint8_t* buffer, size_t maxlength);
 
diff --git a/src/encoding/cryptopp/asn_ext.hpp b/src/encoding/cryptopp/asn_ext.hpp
index 5d726dc..afd33dc 100644
--- a/src/encoding/cryptopp/asn_ext.hpp
+++ b/src/encoding/cryptopp/asn_ext.hpp
@@ -9,26 +9,11 @@
 #ifndef NDN_ASN_EXT_HPP
 #define NDN_ASN_EXT_HPP
 
-#include <stdexcept>
 #include "../../common.hpp"
 #include "../../security/cryptopp.hpp"
 
 namespace ndn {
 
-namespace asn {
-
-class Error : public std::runtime_error
-{
-public:
-  explicit
-  Error(const std::string& what)
-    : std::runtime_error(what)
-  {
-  }
-};
-
-} // namespace asn
-
 size_t
 DEREncodeGeneralTime(CryptoPP::BufferedTransformation& bt,
                      const time::system_clock::TimePoint& time);
diff --git a/src/encoding/oid.hpp b/src/encoding/oid.hpp
index e7b1beb..0cd570d 100644
--- a/src/encoding/oid.hpp
+++ b/src/encoding/oid.hpp
@@ -11,11 +11,14 @@
 
 #include "../common.hpp"
 
-namespace CryptoPP { class BufferedTransformation; }
+namespace CryptoPP {
+class BufferedTransformation;
+}
 
 namespace ndn {
 
-class OID {
+class OID
+{
 public:
   OID ()
   {