Fix shutdown race when restoring alert information from the database (#22448)
* fix(health): close shutdown race in sql_health_alarm_log_load Shutdown does not actively wait for HEALTH to leave sqlite3_step: service_wait_exit(SERVICE_HEALTH) is bounded to 3s, cancel_main_threads only joins threads already marked EXITED, and nd_thread_join_threads reaps the exited list rather than blocking on live threads. If HEALTH is still iterating SQL_LOAD_HEALTH_LOG when sqlite_close_databases() runs, sqlite3_close_v2() tears down the page cache underneath it and the next pcache1Unpin faults at offset 0x30. Bail the row loop on !service_running(SERVICE_HEALTH), matching the existing pattern at sqlite_health.c:567. Also move rw_spinlock_init() before sql_health_alarm_log_load() so the lock the load already takes is initialized first. * fix(health): change spinlock to write lock for health log access