runtime: fix crash in select runtime.park() can access freed select descriptor due to a racing free in another thread. See the comment for details.
runtime: fix crash in select
runtime.park() can access freed select descriptor
due to a racing free in another thread.
See the comment for details.

Slightly modified version of dvyukov's CL 9259045.

No test yet.  Before this CL, the test described in issue 5422
would fail about every 40 times for me.  With this CL, I ran
the test 5900 times with no failures.

Fixes issue 5422.

R=golang-dev, r
CC=golang-dev
https://codereview.appspot.com/9311043

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