Added list instance removal in GattInstance#disconnect()

PTS is trying to connect a device that has not been fully
disconnected, but won't accept that the grpc waits for the
diconnection before returning. We have to remove the
instance as soon as we call disconnect, but we also have
to remove it when the disconnection comes from the device.

Bug: 239103399
Bug: 241962982
Bug: 242184809
Tag: #feature
Test: atest pts-bot
Ignore-AOSP-First: Cherry-picked from AOSP
Merged-In: I808f07d1434fa160ab057528e4e21313348505fe
Change-Id: I808f07d1434fa160ab057528e4e21313348505fe
diff --git a/android/pandora/server/src/com/android/pandora/GattInstance.kt b/android/pandora/server/src/com/android/pandora/GattInstance.kt
index 3db2411..953e373 100644
--- a/android/pandora/server/src/com/android/pandora/GattInstance.kt
+++ b/android/pandora/server/src/com/android/pandora/GattInstance.kt
@@ -124,6 +124,7 @@
     }
     mGatt.close()
     mGatt.disconnect()
+    gattInstances.remove(mDevice.address)
   }
 
   override fun toString(): String {