Use std::atomic_int

It's the future now, no need to reinvent it.