Use C++11 Atomics and merge duplicate RefCount implementations

Atomics and ```[hs](.*)RefCnt``` cleanup/de-duplication, extracted as a stand-alone set from #412