sync/atomic: fix data races in tests Fixes issue 8389.
sync/atomic: fix data races in tests
Fixes issue 8389.

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://codereview.appspot.com/111320044

tv42/old-go,tv42/old-go,tv42/old-go,tv42/old-go,tv42/old-go,tv42/old-go,tv42/old-go