base: ensure Element::Error inherits from tlv::Error

Adding static asserts to ensure (Name|name::Component|Interest|
Selectors|Exclude|KeyLocator|Data|MetaInfo|Signature|SignatureInfo)
::Error are subclasses of tlv::Error.

This commit also adds WireEncodable and WireDecodable concept checks
to Name,name::Component,Interest,Selectors,Exclude,KeyLocator,Data,
MetaInfo,SignatureInfo types.

This commit also moves definition of Selectors method into .cpp.

refs #1983

Change-Id: I15220b93437d4a624ae09df66defc91ceac2386c
diff --git a/src/name-component.cpp b/src/name-component.cpp
index 9c97773..893369f 100644
--- a/src/name-component.cpp
+++ b/src/name-component.cpp
@@ -28,10 +28,17 @@
 #include "encoding/block-helpers.hpp"
 #include "encoding/encoding-buffer.hpp"
 #include "util/string-helper.hpp"
+#include "util/concepts.hpp"
 
 namespace ndn {
 namespace name {
 
+BOOST_CONCEPT_ASSERT((boost::EqualityComparable<Component>));
+BOOST_CONCEPT_ASSERT((WireEncodable<Component>));
+BOOST_CONCEPT_ASSERT((WireDecodable<Component>));
+static_assert(std::is_base_of<tlv::Error, Component::Error>::value,
+              "name::Component::Error must inherit from tlv::Error");
+
 Component::Component()
   : Block(tlv::NameComponent)
 {