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/
(cherry picked from commit 765e6bf470c55d24f8d3576a53946e89395065f9)
Merge pull request #1161 from gbehrmann/fix/2.11/rb7553

alarms: Detach alarms appender on shutdown