Add functionality to filter query results

Often, a query will include results which are not actually desired.  To facilitate filtering out these results, I've introduced a filter interface which the caller can implement and pass to the iterator.  Only results which pass the filter's test will be included in the final results.