Avoid writing to the unblocker pipe if it’s full

This requires locking around the read, unfortunately. Since we must be sure that the IO.select call and the write_nonblock is done without the read being interleaved (because that could mean that we don’t write the the pipe even when we should).
Use the unblocker state directly instead of calling #closed?

This is a tiny performance optimization, and it feels ok to use the state variable internally in the class.
Fix API docs for Acceptor

This should have been here long ago

[ci skip]
Mark the constructor of BaseConnection as private

[ci skip]
Add API docs for IoReactor#bind

I had completely missed this.

[ci skip]
Add an example to the IoReactor#connect API docs

The docs for this method are still way too thin, but I guess most of the usage is in the class docs.
Make a small adjustment to the IoReactor#connect API docs

[ci skip]
Reformat the Redis example code
Use a state variable in IoReactor

Instead of @running and @stopped.
Make the IO reactor restartable

There’s a lot of issues with making the reactor restartable:

* The error listeners need to be kept on and report errors after a restart.
* The error listeners need to report the error that caused the reactor to crash before it is restarted, but not after (the current implementation guarantees that error listeners can be registered after the error has occurred, that might not have been the best implementation, but it needs to be supported for the foreseeable future).
* The future returned by #start and #stop need to be correct at all times
* When #start is called while the reactor is stopping it needs to wait before the reactor has stopped and then start again
* When #connect, #bind, #schedule_timer and #cancel_timer are called before the reactor has started, or after it has stopped these calls should be registered and acted on as soon as the reactor has started.
Ensure that JRuby doesn’t deadlock in the reactor restart tests
Add more JRuby deadlock fixes for the tests