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.