Currently we are force-destroying all channels unconditionally in
pcm_killchan(). However, since asynchronous audio device detach is
possible as of 44e128fe9d92, if we do not check whether the channel is
sleeping or not and forcefully kill it, we will get a panic from
cv_timedwait_sig() (called from chn_sleep()), because it will try to use
a freed lock/cv. Fix this by modifying pcm_killchan() (renamed to
pcm_killchans() since that's a more appropriate name now) to loop
through the channel list and destroy only the channels that are awake.
This loop is repeated until all channels are awakened and destroyed.
Reported by: christos
Fixes: 44e128fe9d92 ("sound: Implement asynchronous device detach")
Sponsored by: The FreeBSD Foundation
MFC after: 3 days