AIDL: Release patches on external device disconnection

When an external device is being disconnected, check
which patches are holding the port and release them.
This replaces the behavior of "postponed disconnection".

Bug: 327449747
Test: repro steps from the bug
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6b5da72d95bd1193841330ab9fc53fb0d7199802)
Merged-In: I98399fd6e820046391ad9ee1e2cb3ae0afc7eed2
Change-Id: I98399fd6e820046391ad9ee1e2cb3ae0afc7eed2
3 files changed