Await any pending/in-flight state write. Call before process.exit in
shutdown handlers — a SIGTERM during the persist debounce (or mid-write)
would otherwise lose claims/revocations. Rejects when the state could
not be written (the caller must NOT report a durable shutdown).
Spread into
startCollabServer(...)options.