atomic: make use of gcc's GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
i686 is not enabled for every platform supporting cmpxchg8b. to work around this, we provide a separate implementation via gcc's atomic builtins