restore use of omp atomics where they can be used
rename to atomics since have alt impl using critical
remove CAS since cannot be atomic in OMP; use atomics elsewhere
implement by-lock version using omp critical instead of pthread mutex
add preprocessor guards on omp headers