* Fix memory model issue in atomic_flag.
In atomic_flag sub-tests that modify local memory, compilers may re-order memory accesses between the local and global address spaces which can lead to incorrect test failures.
This commit ensures that both local and global memory operations are fenced to prevent this re-ordering from occurring.
Fixes#134.
* Clang format changes.
* Added missing global acquire which is necessary for the corresponding global release.
Thanks to @jlewis-austin for spotting.
* Clang format changes.
* Match the condition for applying acquire/release fences.