Improve connection failure detection with direct connections

With network connections, one obvious way to detect errors is to monitor the connection and the channel processes. So if the connection with RabbitMQ is lost or if the channel's writer dies, it is easy to detect the error and restart the processes.

But this does not work with direct connections. Of course, workarounds can be found. But, IMHO, it is more elegant to deal with these errors in the same way, regardless of the type of connection used.

The following patches fix this issue.