src: Improving consistency and correcting code style

As of this commit, all data structures can be directly constructed from
wire format.

This commit excludes full correction of code style in security/ and
tools/ndnsec*, which will be part of a different commit.

Change-Id: I121ac1f81948bc7468990df52cdefeb2988d91a1
Refs: #1403
diff --git a/src/security/certificate.hpp b/src/security/certificate.hpp
index d27f7a4..3470134 100644
--- a/src/security/certificate.hpp
+++ b/src/security/certificate.hpp
@@ -20,7 +20,15 @@
 
 class Certificate : public Data {
 public:
-  struct Error : public std::runtime_error { Error(const std::string &what) : std::runtime_error(what) {} };
+  class Error : public std::runtime_error
+  {
+  public:
+    explicit
+    Error(const std::string& what)
+      : std::runtime_error(what)
+    {
+    }
+  };
 
   typedef std::vector<CertificateSubjectDescription> SubjectDescriptionList;
   typedef std::vector<CertificateExtension> ExtensionList;
@@ -43,7 +51,7 @@
   ~Certificate();
 
   inline void
-  wireDecode(const Block &wire);
+  wireDecode(const Block& wire);
 
   /**
    * encode certificate info into content
@@ -122,7 +130,7 @@
   isTooLate();
 
   void
-  printCertificate(std::ostream &os) const;
+  printCertificate(std::ostream& os) const;
 
 protected:
   void
@@ -137,7 +145,7 @@
 };
 
 inline void
-Certificate::wireDecode(const Block &wire)
+Certificate::wireDecode(const Block& wire)
 {
   Data::wireDecode(wire);
   decode();
@@ -145,7 +153,7 @@
 
 
 inline std::ostream&
-operator <<(std::ostream &os, const Certificate &cert)
+operator <<(std::ostream& os, const Certificate& cert)
 {
   cert.printCertificate(os);
   return os;