network: Respond to messages before closing connections

Now, a connection is closed immediately if it can't receive more messages from the client. If some messages are received, but not processed yet, and they want to respond to the client, this fails. The client never gets the response, because the connection has been closed.

This makes a connection tell the actor to stop the connection, instead of stopping it itself. That means that first, the messages that hasn't been processed yet, will be processed. After that, the connection will be closed.

E.g. it makes this work:
$ echo status | nc localhost 6600