cortex: tolerate BrokenPipe during talent event emit
Keep writing JSONL sidecar events after stdout closes by marking the pipe dead on BrokenPipe/EPIPE and skipping subsequent stdout writes. This lets cortex-side teardown or stream closure avoid masking the talent's own cleanup path.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>