Added a filter for triples

The filter matches subject, predicate and object against regular
expressions. Triples are only passed on (or filtered) if at least one of
the regexp matches.