loop: recover read failures and interrupt blocked input on stop master
An input error silently ends the reader, and stopping it can hang while it waits for queue capacity or a terminal response. Widget dispatch also holds the queue mutex while invoking application handlers. Retry recoverable reads with bounded backoff and expose permanent errors through queue closure after buffered events are consumed. Keep key text and partial Windows input alive across reader failures. Close the queue and cancel the task on stop, using a dedicated event to wake native Windows console waits without terminal cooperation. Dispatch a bounded batch of events outside the queue lock so continued input cannot indefinitely postpone frames and timers. Preserve lossless blocking posts by default, and release paste data if enqueueing fails. Add regression coverage for retries, closure, shutdown, and reentrant event dispatch. Linux tests and Windows/macOS cross-builds pass; native Windows runtime testing remains necessary. Amp-Thread-ID: T-01a0cd7f-3c80-709d-9be2-84643b76cfc3 Co-authored-by: Tim Culverhouse <tim@timculverhouse.com> Fixes: #367