fix GC thread teardown race: join instead of detach, mark DB success from gc()
- keep gc_thread handle and join it during shutdown before dp.deinit() runs —
dp is stack-owned, detaching left a use-after-free window
- add markDbSuccess() call at end of gc() so the health signal isn't solely
dependent on uidForDid (event ingestion path)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>