alarms: Detach alarms appender on shutdown

Otherwise alarms may be attemped to be logged to a datasource that is
already shut down - this causes hanging shutdown issues, in particular
when alarms shares a domain with other services.

Target: trunk
Request: 2.11
Require-notes: yes
Require-book: no
Acked-by: Paul Millar <paul.millar@desy.de>
Patch: https://rb.dcache.org/r/7553/