[libc++][ranges][NFC] Consolidate some repetitive range algorithm tests:

- checking that the algorithm supports predicates returning
  a non-boolean type that's implicitly convertible to `bool`;
- checking that predicates and/or projections are invoked using
  `std::invoke`.

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

GitOrigin-RevId: d4c53202ebb6a61153f9aa39276f9b0d45f3720a
3 files changed