Support custom filter functions.

This is an extension to #33. Useful for filtering multi-valued fields, for example.