channel-contacts: guard against no-op updates
channel-contacts: guard against no-op updates

process_contacts_queue() can already cope with ContactsQueueItems in the
queue which do not actually have any contacts to prepare. As a comment
in the function describes, we still go through the motions of enqueuing
a preparation/upgrade operation to avoid reordering events.

However, previously the function assumed that if any of the three arrays
(of contact objects, ids, or handles) were non-NULL, then they would be
non-empty. This assumption is false, as
<https://bugs.freedesktop.org/show_bug.cgi?id=41470> illustrates.
The concrete example in that bug is an emission of MembersChanged, with
all arrays except Removed empty, and Actor set to 0. We don't bother
preparing contacts which are removed; so
_tp_channel_contacts_queue_prepare_async() is called with an empty array
of contacts. There are a few other signals which can lead to this
situation.

So this patch makes process_contacts_queue() do the right thing if the
arrays are present but empty. (Previously all three paths would assert
in this situation.)

Fixes: <https://bugs.freedesktop.org/show_bug.cgi?id=41470>
Reviewed-by: Simon McVittie <2b470b34502dbf3ba4bcc04ea7e64f4e0e104f33@collabora.co.uk>

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