fix checking for connection close in TcpConnectionSpec

The fix was to only rely on actually selecting not also on checking
key.readyOps since that isn't necessarily reliable without selecting.
Merge pull request #1066 from jrudolph/wip-IO-fix-close-race-condition

fix checking for connection close in TcpConnectionSpec