Removing internal iterators, part 3

Continuation of #7015, and #6995.

Rewrites the `each_split` functions to use an iterator, removes a few redundant methods, and replaces all uses of `len`, `is_empty` and `slice` functions with the methods (and deletes the the functions).