face: move common declarations to face-common.hpp

Change-Id: I0e3e7a93f0693b0e24ca67493a4229987e792ef4
diff --git a/daemon/face/channel.cpp b/daemon/face/channel.cpp
index ed13cb2..8b1333e 100644
--- a/daemon/face/channel.cpp
+++ b/daemon/face/channel.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  Regents of the University of California,
+/*
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -24,6 +24,7 @@
  */
 
 #include "channel.hpp"
+#include "face.hpp"
 
 namespace nfd {
 namespace face {
@@ -37,14 +38,13 @@
 }
 
 void
-connectFaceClosedSignal(Face& face, const std::function<void()>& f)
+connectFaceClosedSignal(Face& face, std::function<void()> f)
 {
-  face.afterStateChange.connect(
-    [f] (FaceState oldState, FaceState newState) {
-      if (newState == FaceState::CLOSED) {
-        f();
-      }
-    });
+  face.afterStateChange.connect([f = std::move(f)] (auto, FaceState newState) {
+    if (newState == FaceState::CLOSED) {
+      f();
+    }
+  });
 }
 
 } // namespace face