fix(observer): atomic writes for observer JSON metadata
Route both observer metadata writers (save_observer, increment_stat)
through atomic_write so a crash between truncate and rename cannot leave
the observer JSON empty or partial. The observer JSON holds the remote
pairing auth key; truncation there bricks sync until the remote device is
re-enrolled. Final-path 0o600 permissions and the existing return /
exception contracts are preserved.
Co-Authored-By: OpenAI Codex <codex@openai.com>