audio policy: Fix handling of external device connection failure

The cleanup code in 'APM::setDeviceConnectionStateInt' was detaching
the external device prior to sending an update to HALs. As a result,
HALs were receiving an empty device address.

Bug: 333196025
Test: atest audiopolicy_tests
Change-Id: I76e8303f81d1d27484a62c073128600fb7718bab
4 files changed