MAP: Track ProfileState, register and unregister of BroadcastReceivers

Use Case:
1. Pair and connect with remote phone.
2. Verify successful profile connection.
3. Pair & Connect LE device.
4. Disconnect & Unpair LE device.
5. Reset BT multiple times.
6. Repeat above steps 50 times

BT Crashed, failed to start MAP services after BT reset.

BT Crash for not handling following exceptions:

 - java.lang.IllegalArgumentException: Receiver not registered
   at: Service
   has leaked IntentReceiver
   Are you missing a call to unregisterReceiver()?

 - This issue is hit when onStop() for MAPService is triggered without onStart()
   being triggered by the time shutdown process gets invoked.
 - Track registration and unregistration for BluetoothMapAppObserver BroadcastReceiver
   to fix IntentReceiver leaks and also added validation for the AppObserver Data.

Change-Id: Ia1c2160fef369bbff42e8da3ea7d925c483e0a12
2 files changed