Sends {"status": "ok"} before shutting down so the caller gets a clean
response. Shutdown runs in a daemon thread to avoid deadlocking the
handler. Adds examples/terminate.mjs as a Node.js usage example.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>