Remove all CTL elements when BlueALSA terminates
Remove all CTL elements when BlueALSA terminates

The ALSA CTL plugin is not currently informed when the BlueALSA daemon
terminates. This is at the very least confusing for users of client
applications, and particularly bad for alsamixer which will abort if the
daemon is restarted because is is still holding invalid references for
the elements.

When a hw soundcard is unplugged, alsamixer detects this by checking
for POLLERR after snd_mixer_poll_descriptors_revents(). Unfortunately
the ctl ext plugin does not call the plugin revents handler, so there
is no obvious way simulate this. So the best we can do when the daemon
terminates is to remove all CTL elements, because at least that way
alsamixer gives sensible information to the user and does not crash if
the daemon is restarted.

Arkq/bluez-alsa,Arkq/bluez-alsa,Arkq/bluez-alsa