This has multiple benefits:
- The optimizations are also performed for the ranges:: versions of the algorithms
- Code duplication is reduced
- it is simpler to add this optimization for other segmented iterators, like ranges::join_view::iterator
- Algorithm code is removed from <deque>
Not tied to this file: Let's add a release note. This is an interesting optimization and it will yield large performance benefits for all segmented iterators, so it's worth advertising.