valkey: count idle time from connect and restart it on incoming data
Stacked on #37993, which makes an idle timeout actually close the socket. Will retarget to main once that lands.
The one timer is armed with connectionTimeout when the socket is opened and only re-armed by send(). So a connection that just sits there, or only receives (a subscriber), has its idleTimeout fire when connectionTimeout runs out, 10s by default, whatever idleTimeout was set to.
Re-arm it when the handshake completes, which switches it to the idle interval (or disarms it when idleTimeout is 0), and again on every incoming packet. This is what the postgres client already does in set_status and on_data.
With idleTimeout 100ms a silent server now gets closed at about 100ms, and a server pushing messages keeps the client alive until it stops. Release closes neither within 15s. Two tests in connection-failures.test.ts, no container needed.
no test proof · iteration 0 · Platform-specific test(s) that do not run on this machine. Deferring to CI, which covers all platforms: test/bundler/cli.test.ts test/cli/hot/watch-many-dirs.test.ts test/cli/install/bun-install.test.ts test/cli/install/bun-pm-diff.test.ts test/cli/install/isolated-install.test.ts test/internal/build-debug-info-flags.test.ts test/internal/build-post-link-ordering.test.ts test/internal/macos-cro…
Fixes #18895 (together with #39511 and #39513, which land before this).