[libc++] Test that our algorithms never copy a user-provided comparator.

This is not mandated by the standard, so it goes in libcxx/test/libcxx/.
It's certainly arguable that the algorithms changed here
(`is_heap`, `is_sorted`, `min`, `max`) are harmless and we should
just let them copy their comparators once. But at the same time,
it's nice to have all our algorithms be 100% consistent and never
copy a comparator, not even once.

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

GitOrigin-RevId: b07b5bd72716625e0976a84d23652d94d8d0165a
12 files changed