runtime: set sweepgen atomically before updating span state
runtime: set sweepgen atomically before updating span state

Sweepone may be running while a new span is allocating.  It
must not see the state updated while the sweepgen is unset.

Fixes issue 8399

LGTM=dvyukov
R=golang-codereviews, dvyukov
CC=golang-codereviews
https://codereview.appspot.com/118050043

wesolows/golang-old,wesolows/golang,wesolows/golang-old,wesolows/golang-old,firebitsbr/golang-old,firebitsbr/golang-old,firebitsbr/golang-old,wesolows/golang,wesolows/golang,wesolows/golang,wesolows/golang,wesolows/golang-old,firebitsbr/golang-old,firebitsbr/golang-old,firebitsbr/golang-old,wesolows/golang-old,wesolows/golang,wesolows/golang,firebitsbr/golang-old,wesolows/golang-old,wesolows/golang-old,firebitsbr/golang-old