Replays PR #4176 on current main and preserves the connection catch-up path from #4177.
Replace the array-backed command model with HashMap/HashSet state, evict deleted thread bodies, prune released VCS and browser caches, and clear per-thread client state.
Adds focused coverage for read-model invariants, deletion behavior, client cleanup, and VCS cache eviction after the final subscriber releases.
Co-authored-by: codex <[email protected]>