Properly handle simultaneous acquire and release
Properly handle simultaneous acquire and release

A client that closes its A2DP PCM handle then immediately opens the same
device can cause the daemon to start acquisition for the second open
before release of the first has completed. Thus we need to add thread
synchronization to prevent corruption of the transport state.

This fix relies on an assumption that the IO thread holds the cleanup
lock throughout the time that transport release is in progress.

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