As an extension, support string(std::move(s), pos, n) in C++20
as well as C++23. Otherwise ,it's difficult to implement the
behavior for std::move(oss).str() in C++
Add test coverage for the new behaviors, especially to verify
the returned string uses the correct allocator.
Fixes the issue https://github.com/llvm/llvm-project/issues/64644