Thread safety issues

Mark mutable so static analyzer knows it is protected
by atomic.  Fix thread safety issue in the copy constructor.
Use default memory behavior in the atomic functions.