model: Adding exclude filter processing in all content store implementations

Although exclude filter is honored now by content stores, forwarding
strategy is completely ignoring them.  That is, if somebody replies to
an interest with a data packet that violates the filter, this data
packet will propagate back to the requester.  This "problem" may or may
not be addressed in future.

Refs #1009 (http://redmine.named-data.net/issues/1009)
diff --git a/model/cs/content-store-impl.h b/model/cs/content-store-impl.h
index 69fa00e..90d0c95 100644
--- a/model/cs/content-store-impl.h
+++ b/model/cs/content-store-impl.h
@@ -155,6 +155,24 @@
   return tid;
 }
 
+struct isNotExcluded
+{
+  inline
+  isNotExcluded (const Exclude &exclude)
+    : m_exclude (exclude)
+  {
+  }
+  
+  bool
+  operator () (const name::Component &comp) const
+  {
+    return !m_exclude.isExcluded (comp);
+  }
+
+private:
+  const Exclude &m_exclude;
+};
+
 template<class Policy>
 Ptr<ContentObject>
 ContentStoreImpl<Policy>::Lookup (Ptr<const Interest> interest)
@@ -162,7 +180,16 @@
   NS_LOG_FUNCTION (this << interest->GetName ());
 
   /// @todo Change to search with predicate
-  typename super::const_iterator node = this->deepest_prefix_match (interest->GetName ());
+  typename super::const_iterator node;
+  if (interest->GetExclude () == 0)
+    {
+      node = this->deepest_prefix_match (interest->GetName ());
+    }
+  else
+    {
+      node = this->deepest_prefix_match_if_next_level (interest->GetName (),
+                                                       isNotExcluded (*interest->GetExclude ()));
+    }
 
   if (node != this->end ())
     {