media: buffered frame server for zero-downtime worker reconnect master
The transport core of the detach/reattach path. frameServer delivers a worker's signed segments to main over a reconnectable socket, buffering — bounded, drop-oldest, counted — whenever no client is attached. That's what makes a main restart lossless: main disconnects to upgrade, the worker keeps signing segments into the buffer, and the reconnecting main replays the buffer in order before going live. An outage longer than the buffer window drops the oldest tail loudly (droppedCount) rather than growing without bound; a write to a dead client auto-detaches and re-buffers. RunMKVIngestWorker now takes a FrameWriter interface (satisfied by both *ingestframe.Writer for the Stage-1 pipe and *frameServer for the socket path), so the worker body is transport-agnostic. Tests (deterministic, no gst/subprocess): buffer-while-disconnected then replay-in-order across a simulated restart with zero loss; drop-oldest beyond the bound with correct accounting; and the real accept loop flushing buffered frames on connect then streaming live. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>