Change placeAndVerifyCall to wait until connection is fully added to CS.

Modified placeAndVerifyCall so that it will wait until the new connection
has been confirmed to be in the ConnectionService, as identified by
ConnectionService#getAllConnections().  The lock which is used to inform
the CTS tests that a connection was added is triggered in
MockConnectionSrevice#onCreateOutgoingConnection, which is called
BEFORE the ConnectionService adds the new connection to the list of
connections returned by getAllConnections.  So there is a small window
of time where the connection is not added to that collection, but the
lock release indicates that it should have been.

Doing this helps correct some infrequent CTS failures caused by such
race conditions.

Bug: 25169252
Change-Id: Ie4c4ba25b6758813a87741499d8c90472f91603f
2 files changed