Protect against non-ims connections when using D2D test commands.

Skip sending messages if a connection is not an IMS connection and also
ensure that if we change out the original connection (e.g. SRVCC) that
we will clear out any existing D2D objects.

Test: Manual testing.
Fixes: 182292663
Change-Id: I3498e3211fd7dce7d6d2aa0617e0e380ed55ce68
2 files changed