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/security/validator-regex.cpp b/src/security/validator-regex.cpp
index 194aaf1..0539abd 100644
--- a/src/security/validator-regex.cpp
+++ b/src/security/validator-regex.cpp
@@ -161,17 +161,17 @@
                   return;
                 }
             }
-          catch (tlv::Error& e)
-            {
-              return onValidationFailed(data.shared_from_this(),
-                                        "Cannot decode signature");
-            }
           catch (KeyLocator::Error& e)
             {
               return onValidationFailed(data.shared_from_this(),
                                         "Key Locator is not a name: " +
                                         data.getName().toUri());
             }
+          catch (tlv::Error& e)
+            {
+              return onValidationFailed(data.shared_from_this(),
+                                        "Cannot decode signature");
+            }
         }
     }