Non-PTY SSH sessions keep their process running after the client leaves, so
the disconnect was only reported when that process exited and connection log
rows stayed "Ongoing".
- Report the disconnect with reason client_closed when the SSH connection
closes, or when the handler returns, whichever comes first.
- Guard the report with sync.Once so it happens once and finishes before the
handler returns.
- Keep non-PTY process lifetime unchanged (OpenSSH-compatible, #18519).
- Add TestSSHShutdownReason/ClientDisconnectWhileProcessRuns.
Closes CLIENT-1112