Refactor filter() to use own implementation of FilterIterator
and remove the excess argument stripping code from the Closure
utility class. The native CallbackFilterIterator class passes
element, key and the iterator itself to the callback, something
some functions (like `strlen()`) may not be able to cope with.