Improve and simplify code with modern C++ features

Change-Id: I83bf5513c2a1f90ba5a59e93c473306864b27d94
diff --git a/daemon/fw/access-strategy.cpp b/daemon/fw/access-strategy.cpp
index a766424..8460a00 100644
--- a/daemon/fw/access-strategy.cpp
+++ b/daemon/fw/access-strategy.cpp
@@ -35,8 +35,7 @@
 
 AccessStrategy::AccessStrategy(Forwarder& forwarder, const Name& name)
   : Strategy(forwarder)
-  , m_removeFaceInfoConn(this->beforeRemoveFace.connect(
-                         bind(&AccessStrategy::removeFaceInfo, this, _1)))
+  , m_removeFaceInfoConn(beforeRemoveFace.connect([this] (const Face& face) { removeFaceInfo(face); }))
 {
   ParsedInstanceName parsed = parseInstanceName(name);
   if (!parsed.parameters.empty()) {
@@ -177,14 +176,13 @@
     return;
   }
 
-  pit::InRecordCollection::iterator inRecord = pitEntry->getInRecord(*inFace);
+  auto inRecord = pitEntry->getInRecord(*inFace);
   BOOST_ASSERT(inRecord != pitEntry->in_end());
   // in-record is erased only if Interest is satisfied, and RTO timer should have been cancelled
   // note: if this strategy is extended to send Nacks, that would also erase in-record,
   //       and RTO timer should be cancelled in that case as well
 
   const Interest& interest = inRecord->getInterest();
-
   const fib::Entry& fibEntry = this->lookupFib(*pitEntry);
 
   NFD_LOG_DEBUG(pitEntry->getInterest() << " timeoutFrom " << firstOutFaceId <<
@@ -227,14 +225,14 @@
     return;
   }
 
-  pit::OutRecordCollection::iterator outRecord = pitEntry->getOutRecord(inFace);
+  auto outRecord = pitEntry->getOutRecord(inFace);
   if (outRecord == pitEntry->out_end()) { // no out-record
     NFD_LOG_DEBUG(pitEntry->getInterest() << " dataFrom " << inFace.getId() <<
                   " no-out-record");
     return;
   }
 
-  time::steady_clock::Duration rtt = time::steady_clock::now() - outRecord->getLastRenewed();
+  auto rtt = time::steady_clock::now() - outRecord->getLastRenewed();
   NFD_LOG_DEBUG(pitEntry->getInterest() << " dataFrom " << inFace.getId() <<
                 " rtt=" << time::duration_cast<time::microseconds>(rtt).count());
   this->updateMeasurements(inFace, data, time::duration_cast<RttEstimator::Duration>(rtt));
@@ -260,7 +258,7 @@
 
 AccessStrategy::MtInfo::MtInfo()
   : lastNexthop(face::INVALID_FACEID)
-  , rtt(1, time::milliseconds(1), 0.1)
+  , rtt(1, 1_ms, 0.1)
 {
 }
 
@@ -292,14 +290,13 @@
     BOOST_ASSERT(me != nullptr);
   }
 
-  static const time::nanoseconds ME_LIFETIME = time::seconds(8);
-  this->getMeasurements().extendLifetime(*me, ME_LIFETIME);
+  this->getMeasurements().extendLifetime(*me, 8_s);
 
   return me->insertStrategyInfo<MtInfo>().first;
 }
 
 AccessStrategy::FaceInfo::FaceInfo()
-  : rtt(1, time::milliseconds(1), 0.1)
+  : rtt(1, 1_ms, 0.1)
 {
 }