ghc-prim: Use C11 atomics
Previously ghc-prim
's atomic wrappers used the legacy __sync_*
family of C builtins. Here we refactor these to rather use the
appropriate C11 atomic equivalents, allowing us to be more explicit
about the expected ordering semantics.