mgmt: LpFace faces/enable-local-control workaround

In this temporary workaround,
faces/enable-local-control enables all local fields in GenericLinkService,
and faces/disable-local-control disables all local fields in GenericLinkService.

This commit also modifies FaceTable::remove to retain shared_ptr<Face>
until signal execution is complete.

refs #3226

Change-Id: I3513e97ec2af87df94dbf57a7256b895ed9d2103
diff --git a/daemon/fw/face-table.cpp b/daemon/fw/face-table.cpp
index 1884203..a8a8053 100644
--- a/daemon/fw/face-table.cpp
+++ b/daemon/fw/face-table.cpp
@@ -25,6 +25,7 @@
 
 #include "face-table.hpp"
 #include "forwarder.hpp"
+#include "core/global-io.hpp"
 #include "core/logger.hpp"
 
 namespace nfd {
@@ -111,6 +112,9 @@
                " (" << reason << ")");
 
   m_forwarder.getFib().removeNextHopFromAllEntries(face);
+
+  // defer Face deallocation, so that Transport isn't deallocated during afterStateChange signal
+  getGlobalIoService().post([face] {});
 }
 
 FaceTable::ForwardRange