ACTIVE->HOLD happens before HOLD->ACTIVE

Make sure that existing active calls get their states updated first
before we activate any new calls.  This ensures that there never exist
more than 1 active call.

Bluetooth PTS certfication test TC_AG_TWC_BV_03_I fails.  This test
verifies the ability to swap a background and a foreground call.  Per the
spec, this test expects that the active call is first put on hold and
then previously held call is activated.

The telephony layer was doing that in the lower layers,
but due to order of call-state-change notifications,
we weren't guaranteed the order of ACTIVE->HOLD vs
HOLD->ACTIVE.  This change makes that deterministic by ensuring that 
simultaneous call-state changes always update previously ACTIVE calls
before updating new calls to ACTIVE.

Bug: 17991921
Change-Id: I4e4789c044d9e3614f42143cfa6053881a6d109b
1 file changed