protocol: fix Prefix __repr__
socket: stop _write greenlet properly on disconnect