[libc++] Fix allocate_shared when used with an explicitly convertible allocator

When the allocator is only explicitly convertible from other specializations
of itself, the new version of std::allocate_shared would not work because
it would try to do an implicit conversion. This patch fixes the problem
and adds a test so that we don't fall into the same trap in the future.

GitOrigin-RevId: a00290ed10a6b4e9f6e9be44ceec367562f270c6
2 files changed