Fix connection detection logic.

The fact that we have socket back from IO::select, does not necessarily
mean that mean that we can actually ready and/or write to it.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Yeah, we don't touch this variable anywhere in the chef or ohai codebase.  If you want to be careful enough to worry about this global setting getting tweaked, I'd vote to just force it:

```
Socket.do_not_reverse_lookup = true
```

and leave it at that.  Its the responsibility of anyone else who wants that to be false to set it correctly and then set it back.