face: Implementing new "isOnDemand" flag

This flags replaces isPermanent flag in datagram faces, but with the
reversed logic (isPermanent = !isOnDemand)

Change-Id: I37ba604e5f105ca95a79a08b8cfc3d640df8b412
Refs: #1376
diff --git a/daemon/face/tcp-channel.cpp b/daemon/face/tcp-channel.cpp
index c27f1df..28fdfa5 100644
--- a/daemon/face/tcp-channel.cpp
+++ b/daemon/face/tcp-channel.cpp
@@ -112,15 +112,16 @@
 
 void
 TcpChannel::createFace(const shared_ptr<ip::tcp::socket>& socket,
-                       const FaceCreatedCallback& onFaceCreated)
+                       const FaceCreatedCallback& onFaceCreated,
+                       bool isOnDemand)
 {
   tcp::Endpoint remoteEndpoint = socket->remote_endpoint();
 
   shared_ptr<Face> face;
   if (socket->local_endpoint().address().is_loopback())
-    face = make_shared<TcpLocalFace>(boost::cref(socket));
+    face = make_shared<TcpLocalFace>(boost::cref(socket), isOnDemand);
   else
-    face = make_shared<TcpFace>(boost::cref(socket));
+    face = make_shared<TcpFace>(boost::cref(socket), isOnDemand);
 
   face->onFail += bind(&TcpChannel::afterFaceFailed, this, remoteEndpoint);
 
@@ -164,7 +165,7 @@
 
   NFD_LOG_DEBUG("[" << m_localEndpoint << "] "
                 "<< Connection from " << socket->remote_endpoint());
-  createFace(socket, onFaceCreated);
+  createFace(socket, onFaceCreated, true);
 }
 
 void
@@ -193,7 +194,7 @@
   NFD_LOG_DEBUG("[" << m_localEndpoint << "] "
                 ">> Connection to " << socket->remote_endpoint());
 
-  createFace(socket, onFaceCreated);
+  createFace(socket, onFaceCreated, false);
 }
 
 void