emacs: fix pm-sidebar render runaway (overlay leak + render debounce)
pm-sidebar--render rebuilt the buffer with erase-buffer but never deleted
the overlays the previous render created (visibility indicators, magit
highlight/selection). erase-buffer only collapses overlays to point 1, so
they accumulated every refresh; the leaked overlays anchor markers near
point 1, turning every insert into O(stale-markers) and growing RSS without
bound until the single-threaded daemon pegged a core and wedged (observed
23GB+ RSS, unrecoverable without a daemon restart).
- render: remove-overlays before erase-buffer (stops the leak)
- handle + window-size-change: coalesce renders behind a 0.2s timer so an
SSE burst (snapshot replay, status churn, resize storm) collapses into
one render instead of one full rebuild per event
- proc-filter: walk lines with a running index + one trailing substring
(was O(n^2) substring-per-line), use string-replace, and cap the
accumulator to guard a non-terminating line
Add ERT coverage: overlay cleanup, render coalescing, quit cancels the
render timer, chunked-SSE parsing, accumulator cap.