Use std::atomic counter in SharedPtr.