Add iterator traits, notably to manipulate nested iterators.
Add a forward flatten_iterator.