[libc++] Add missing XFAIL to tests that need __atomic_* libcalls

FreeBSD did not provide the __atomic_* functions as part of the base
system until recently. They were added to libgcc_s in SVN revision r364753
(August 2020), so check for availability of 'non-lockfree-atomics' so that
these tests do not fail unexpectedly on older versions of FreeBSD.

This also removes the #ifndef __APPLE__ from atomic_helpers.h that was used
to work around lack of atomic runtime functions on older Apple platforms
and replaces it with XFAIL: !non-lockfree-atomics.

Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D88818

GitOrigin-RevId: 32733c347d7bc77ce2c40b067a3bdaadc4b8aadf
14 files changed