[libc++][ranges] Implement `ranges::rotate`.

Also fix `ranges::stable_sort` and `ranges::inplace_merge` to support
proxy iterators now that their internal implementations can correctly
dispatch `rotate`.

Differential Revision: https://reviews.llvm.org/D130758

GitOrigin-RevId: 36c746ca2d5b325a7ac64135c1ff8774c06ab34c
21 files changed