common/proxy.scm (main-loop): Improve handling of the "stop" command.