Bug fix in AtomicCounter.cpp

Since default initialization of std::atomic<int> in a class object is poor supported in g++4.7/4.8, use flag to do lazy initialization.