revdial: fix Lock-after-Lock bug, where server EOF wouldn't unblock conns

If the server's conn stopped reading, we acquired a Lock twice
(blocking forever) and never killing all the active connections on it.

Add test.

Probably fixes golang/go#12666

Change-Id: I4ff670a55e8d92e6e2ebe14a94137d6f15f3768e
Reviewed-on: https://go-review.googlesource.com/14700
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2 files changed