audiopolicy: stop output if it's still active before being released.

There's an assertion in outputDesc->removeClient assuming client
is inactive before removed, which is not always true.

Fix by stoping the output before being released.

Bug: 140221629
Test: make
Change-Id: Ifd7ee020ee4e392d80e93763e078d363a62ec8c4
3 files changed