Construct a new iterator that will filter $iter based on the results from
$sub. $sub should return 0 if the next() from $iter should be filtered and
1 if it should be treated as the next item in the sequence.
$data is an optional arbitrary data item which will be passed to $sub in $_[1]