table: NameTree::getEntry

NameTree::get is renamed to NameTree::lookup.
NameTree::getEntry is introduced to return the NameTreeEntry on which a table entry is attached.
tableEntry::m_nameTreeEntry is changed to weak_ptr to avoid circular shared_ptr reference.

refs #3608, #3619

Change-Id: I425b6a2eb5fe3024bbaff4ff766eb6739be54b02
diff --git a/daemon/table/pit-entry.hpp b/daemon/table/pit-entry.hpp
index e432c4e..282d1df 100644
--- a/daemon/table/pit-entry.hpp
+++ b/daemon/table/pit-entry.hpp
@@ -38,8 +38,6 @@
 class Entry;
 } // namespace name_tree
 
-class Pit;
-
 namespace pit {
 
 /** \brief an unordered collection of in-records
@@ -196,11 +194,10 @@
   InRecordCollection m_inRecords;
   OutRecordCollection m_outRecords;
 
-  shared_ptr<name_tree::Entry> m_nameTreeEntry;
+  weak_ptr<name_tree::Entry> m_nameTreeEntry;
 
   friend class nfd::NameTree;
   friend class nfd::name_tree::Entry;
-  friend class nfd::Pit;
 };
 
 inline const Interest&