net: remove race condition on Close.
net: remove race condition on Close.

Previously a netFd could be queued for reading/writing in the channel,
but close(2)'ed before pollServer got to it. In this case, the kernel
would consider the descriptor closed and the attempt to add it to the
epoll set would fail and panic.

This patch makes Close a roundtrip to the pollServer, although the
actual close(2) still occurs elsewhere to avoid blocking the
pollServer.

Fixes issue 143.

R=rsc
CC=golang-dev
http://codereview.appspot.com/152130

Committer: Adam Langley <db68fba232b2c49ed3e9d3081df349dde7b61dfd@golang.org>

tav/go,tav/go,tav/go,tav/go,tav/go,tav/go,tav/go