atomics: Move atomics/recounting support to separate files