Check integer range during decoding

This commit also moves ControlResponse test suite to the correct
place under mgmt/ instead of mgmt/nfd/.

refs #3200

Change-Id: I1a0578b3e68b8c36c84a6af03d0c47bebe598fe1
diff --git a/src/selectors.cpp b/src/selectors.cpp
index 8890b58..a207775 100644
--- a/src/selectors.cpp
+++ b/src/selectors.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -145,13 +145,13 @@
   // MinSuffixComponents
   Block::element_const_iterator val = m_wire.find(tlv::MinSuffixComponents);
   if (val != m_wire.elements_end()) {
-    m_minSuffixComponents = readNonNegativeInteger(*val);
+    m_minSuffixComponents = readNonNegativeIntegerAs<int>(*val);
   }
 
   // MaxSuffixComponents
   val = m_wire.find(tlv::MaxSuffixComponents);
   if (val != m_wire.elements_end()) {
-    m_maxSuffixComponents = readNonNegativeInteger(*val);
+    m_maxSuffixComponents = readNonNegativeIntegerAs<int>(*val);
   }
 
   // PublisherPublicKeyLocator
@@ -169,7 +169,7 @@
   // ChildSelector
   val = m_wire.find(tlv::ChildSelector);
   if (val != m_wire.elements_end()) {
-    m_childSelector = readNonNegativeInteger(*val);
+    m_childSelector = readNonNegativeIntegerAs<bool>(*val);
   }
   else {
     m_childSelector = DEFAULT_CHILD_SELECTOR;