Hardened flushing by sending a final "null" message

To ensure proper flushing of the Netty transport a "null" message is written to the channel first, and we proceed with the release of the resources after that operation is finished.