protocol: Copy missing pixel formats from wl_drm to wl_shm
client: Simply wl_display_dispatch_queue_pending() and fix return value

We're supposed to return number of events dispatched on success, not 0.
Refactor to avoid goto and just return ret.
wayland-server: Add a numerical id per client

Assign each client a numerical id when the client is created for the
display. We do not want the client ids to be sparse so that they can be
used for space efficient lookups in the compositor; so when the client
is destroyed we release the id either into the next counter if it was
the most recent client or into a free pool. The next id is provided
using a most recently freed strategy.

Since the structure is opaque this change also adds an accessor function
for the client to retrieve the id.
wayland-server: Add a wl_resource_for_each macro

This macro allows you to correctly iterate through a list of resources
handling the opaque nature of this type.
wayland-client: Add wl_proxy_get_listener

This is the mirror function to wl_proxy_add_listener and is useful
inside client libraries to differentiate events on listeners for which
multiple proxies have been created.