signature: reorganize code

In SignatureInfo, Signature, and its subclasses:

* Improve Doxygen.
* Improve error messages.
* Make comparison operators non-member functions.

refs #4171

Change-Id: I9395a72594702255b41e3700ee145f35fc1a41f2
diff --git a/src/security/digest-sha256.cpp b/src/security/digest-sha256.cpp
index bbe2e10..3c8867c 100644
--- a/src/security/digest-sha256.cpp
+++ b/src/security/digest-sha256.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2015 Regents of the University of California.
+/*
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -32,7 +32,7 @@
   : Signature(signature)
 {
   if (getType() != tlv::DigestSha256)
-    BOOST_THROW_EXCEPTION(Error("Incorrect signature type"));
+    BOOST_THROW_EXCEPTION(Error("Cannot construct DigestSha256 from SignatureType " + to_string(getType())));
 }
 
 } // namespace ndn