choose C11 atomics before anything else (besides unsafe)
add some configure magic for C11 impl
fix a pass-by-val/ref bug and add a bunch of explicit casts for void* <-> intptr_t
remove incorrect casting
add FIXME related to CAS