runtime/race: test that close synchronizes with read
runtime/race: test that close synchronizes with read

Add a test to ensure that the race detector sees that closing a
channel synchronizes with a read from that channel.
This test case failed when CL 181543 was in the tree.
CL 181543 was reverted in CL 216158; this adds a test to make
sure that we don't re-introduce the problem at a later date.

For #32529
For #36714

Change-Id: I5a40f744c67c3f8191d6ad822710c180880a7375
Reviewed-on: https://go-review.googlesource.com/c/go/+/216099
Run-TryBot: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Emmanuel Odeke <277f8eaa8c7dfbc55c17bf5e30561c1a9c45c569@gmail.com>

nawawi/go,golang/go,akutz/go,golang/go,golang/go,akutz/go,akutz/go,golang/go,nawawi/go,cloudflare/go,golang/go,cloudflare/go,nawawi/go,nawawi/go,nawawi/go,CAFxX/go,CAFxX/go,akutz/go,CAFxX/go,cloudflare/go,nawawi/go,cloudflare/go,akutz/go,akutz/go,nawawi/go,nawawi/go,CAFxX/go,CAFxX/go,cloudflare/go,cloudflare/go,CAFxX/go,golang/go,cloudflare/go,golang/go,CAFxX/go,akutz/go,cloudflare/go,golang/go,akutz/go,CAFxX/go