Stop apparent error from remote server when read-only client disconnects
A read-only client just closes the connection when done, but the server
reports "Got exception NetworkError: Received EOF", which reads like
there was a problem.
If the server gets EOF when waiting for a new command, we now just
say "Connection closed", while EOF in other circumstances is now
reported more clearly as "Connection closed unexpectedly".
Possibly fixes #654, reported by German M. Bravo.
(cherry picked from commit
bcf9b05336b9ea0a53158d678c0a8084ca42e123)