Prevent ClassCastException in TelephonyConnection during multiendpoint call.

The logic in refreshConferenceSupported needed to be modified to ensure
that it could avoid invalid casts.  The isImsConnection method just checked
the phone type of the connection, which was wrong since an
ImsExternalConnection has an Ims phone type but isn't an ImsPhoneConnection.

Test: Wrote unit test to verify external calls don't cause casting
exception.
Fixes: 161334144

Change-Id: I77b60e0fe30b2d3eb3dc3c292ab70a389954eda3
4 files changed