Fixes #3105 IOSelector exception handling.

There are 2 improvements:
1: if the selector fails to be opened, the exception isn't propated and can lead to an infinite loop in the run method
2: if the selector.select fails, it can lead to an hot cpu because of spinning. I have applied the same technique as used in Netty to prevent this from happening. Also the full exception stacktrace is logged.

I'll create a forward port to 3 master once this PR is verified.