Allow elements to be tested against arbitrary complex filters
Test to_predicate
sort_section can check arity. Deprecate custom_sort_section. Fix a test