hal: Fix issues with USB audio after disconnect

 * Stop the USB audio thread when the refcnt goes to zero.
 * Fix tracking of multiple soundcards.

Change-Id: Ia24dbcfcbcc855cde32c57dbbeb6d07af8f4cce8
hal: Correct the multi-channel output usecase selection

Both Multi-channel output on HDMI and Compress offload playback on
HDMI use cases request for a stream with AUDIO_OUTPUT_FLAG_DIRECT.
The current logic would then result selection MULTI_CH usecase.
Fix this by checking for complete match of flags to select the
use case.

Change-Id: I66df94af6c3b837a6c8054282364e1acf78e6e0f
hal: fix channel mask for m-ch offload playback

- Update channel mask with compress parameters for
  compress offload playback on HDMI device

Change-Id: I89263f56923588fcb906facfd4ae9ebf95203743