weston-launch: Ignore sighup

When our session terminates all processes get a SIGHUP.  We need to ignore
that in weston-launch and stay around to help weston shut down properly.

https://bugs.freedesktop.org/show_bug.cgi?id=63004
cms-colord: fix compilation warning around _GNU_SOURCE
input: For serial generation get the display from the compositor

This removes the use of wl_client_get_display() where the client is
derived from the focussed resource. This starts the removal of the
assumption of a single resource on a client that would be notified about
events on the focussed surface.
input: Use a client destroy listener for resetting the focus resource

This is currently equivalent as there is no way for the pointer, keyboard
or touch resource to be destroyed without the client being destroyed.
This removes another place where a single resource for the focus is
assumed.
input: Use a client id indexed array for input device resources

Replace the list of resources per pointer/keyboard/touch with an array
of pointers to lists of resources from that client.

For compatability with the existing code find_resource_for_surface has
been modified to return the resource associated with the first entry in
the list and this is used to fill the focussed resource member on
pointer, keyboard and touch.
data-device: Lookup drag resources using the focussed surface

Rather than relying on focussed resource to get the client to lookup the
drag resource with instead derive the client from the focussed surface.

This is equivalent as the focussed resource is derived from the focussed
surface in the weston_keyboard_set_focus function.
input: Emit events on all resources for a client

The Wayland protocol permits a client to request the pointer, keyboard
and touch multiple times from the seat global. This is very useful in a
component like Clutter-GTK where we are combining two libraries that use
Wayland together.

This change migrates the weston input handling code to emit the
events for all the resources for the client by using the newly added
wl_resource_for_each macro to iterate over the resources that are
associated with the focussed surface's client. A pointer to the list of
resources is stored as a member on the device structures. In order to
handle the loss of focus or the non-availability of a list of resources
an empty list sentinel is used.
input: Free the memory allocated to store the device resource lists

v2: Walk the array manually as wl_array_for_each is bytewise we're
storing pointers that we need to free.
text-backend: remove the weston_seat destruction listener on destroy

Prior to freeing the memory in which the link node for the signal is
emedded we should remove the link node from the list to prevent the list
from being corrupted.

https://bugs.freedesktop.org/show_bug.cgi?id=67231
clipboard: remove the weston_seat destruction listener on destroy

Prior to freeing the memory in which the link node for the signal is
emedded we should remove the link node from the list to prevent the list
from being corrupted.

https://bugs.freedesktop.org/show_bug.cgi?id=67231
input: Use new wl_resource_for_each for sending updated seat caps