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/utils/trie/trie-with-policy.h b/utils/trie/trie-with-policy.h
index 2e1f883..8d95aff 100644
--- a/utils/trie/trie-with-policy.h
+++ b/utils/trie/trie-with-policy.h
@@ -210,7 +210,7 @@
    */
   template<class Predicate>
   inline iterator
-  deepest_prefix_match (const FullKey &key, Predicate pred)
+  deepest_prefix_match_if (const FullKey &key, Predicate pred)
   {
     iterator foundItem, lastItem;
     bool reachLast;
@@ -236,6 +236,40 @@
       }
   }
 
+  /**
+   * @brief Find a node that has prefix at least as the key
+   *
+   * This version of find checks predicate for the next level and if
+   * predicate is True, returns first deepest match available
+   */
+  template<class Predicate>
+  inline iterator
+  deepest_prefix_match_if_next_level (const FullKey &key, Predicate pred)
+  {
+    iterator foundItem, lastItem;
+    bool reachLast;
+    boost::tie (foundItem, reachLast, lastItem) = trie_.find (key);
+
+    // guard in case we don't have anything in the trie
+    if (lastItem == trie_.end ())
+      return trie_.end ();
+
+    if (reachLast)
+      {
+        foundItem = lastItem->find_if_next_level (pred); // may or may not find something
+        if (foundItem == trie_.end ())
+          {
+            return trie_.end ();
+          }
+        policy_.lookup (s_iterator_to (foundItem));
+        return foundItem;
+      }
+    else
+      { // couldn't find a node that has prefix at least as key
+        return trie_.end ();
+      }
+  }
+  
   iterator end () const
   {
     return 0;