Fix console printing and use a proper quit by sending the \quit command to the server.
Merge connection and client/server code: the code is not similar (in sublte ways) between client and server, common parts are already factorize in neev.