Kill the clients softly upon disconnect.

Axel Kohlmeyer is helping bringing an i-pi interface to stock LAMMPS. He pointed out that the typical approach we take of letting the client die when the socket is closed is a bit brutal, and I think he has a point. So I investigated the issue, and I think there is a very simple way to send an EXIT termination message to the client before disconnecting the socket.
I have implemented this in such a way that clients to not need to implement this feature, so it should be fully backwards-compatible. Will let this simmer here for a bit to see if anyone is objecting. The fix should be easily portable to the dev branch as well.