change default FreshnessPeriod to 0 ms

set InterestLifetime to default value when not present

do not encode ChildSelector if at default value

refs #3944

Change-Id: I4a3ebf5512d0d2270798ed212eab7903ba8b8ed0
diff --git a/src/meta-info.hpp b/src/meta-info.hpp
index 798acd1..bec2275 100644
--- a/src/meta-info.hpp
+++ b/src/meta-info.hpp
@@ -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).
  *
@@ -31,6 +31,8 @@
 
 namespace ndn {
 
+const time::milliseconds DEFAULT_FRESHNESS_PERIOD = time::milliseconds::zero();
+
 /**
  * An MetaInfo holds the meta info which is signed inside the data packet.
  *
@@ -97,8 +99,11 @@
   const time::milliseconds&
   getFreshnessPeriod() const;
 
+  /** @brief set FreshnessPeriod
+   *  @throw std::invalid_argument specified FreshnessPeriod is < 0
+   */
   MetaInfo&
-  setFreshnessPeriod(const time::milliseconds& freshnessPeriod);
+  setFreshnessPeriod(time::milliseconds freshnessPeriod);
 
   const name::Component&
   getFinalBlockId() const;