TpConnectionManager: defer ListProtocols() until we know the initial name
TpConnectionManager: defer ListProtocols() until we know the initial name

The fact that a name owner change to "" ends introspection and emits
"exited" means we don't behave as documented in
tp_connection_manager_activate, which claims that "exited" before
"activated" means a failure to activate.

This isn't necessarily true if someone calls
tp_connection_manager_activate() straight after constructing the TpCM,
*and* the CM is not currently running. In that case, the ListProtocols()
call is in parallel with GetNameOwner(); GetNameOwner() will win the
race, because dbus-daemon processes it synchronously and replies
immediately. When GetNameOwner() returns error, watch_name_owner tells us
there is no owner, the ListProtocols() call is cancelled, and "exited"
is emitted.

However, that ListProtocols() call was in fact a perfectly good
service-activation, which would start the CM up!

The solution is to defer ListProtocols() until the CM's initial name is
known, and avoid emitting "exited" on the basis of initial state.

Distrotech/telepathy-glib,Distrotech/telepathy-glib,Distrotech/telepathy-glib,Distrotech/telepathy-glib,Distrotech/telepathy-glib