unit test code for atomic operations

we need only 2 atomic operations: atomic-increment and
atomic-load-value-in-variable (for debugging builds only which is not
implemented yet)
also included is MemoryBarrier() [ iOS —> libkern/OSAtomic.h  for phase
1]