[libcxx] moves `std::invoke` into `__functional_base`

Including `<concepts>` in other standard library headers (such as
`<iterator>`) creates circular dependencies due to `<functional>`.
Since `<concepts>` only needs `std::invoke` from `<functional>`, the
easiest, fastest, and cleanest way to eliminate the circular dep is to
move `std::invoke` into `__functional_base`.

This has the added advantage of `<concepts>` not transitively importing
`<functional>`.

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

GitOrigin-RevId: c25c22d5f9b7e56c0c350982b5ec41095c5a0a05
3 files changed