Make `rest` and `second` work on iterators.