libstdc++: Adjust effective-target requirements for <barrier> and <semaphore>
These features depend on __cpp_lib_atomic_wait which is not available
for freestanding, and is available when either gthreads is supported, or
the target is linux (for futex support).