wayland-server: Use wl_resource instead of wl_buffer

wl_buffer has been deprecated in the server API and instead
compositors should be directly passing the wl_resource pointer to
eglQueryWaylandBuffer.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit f13278bcf3f1475b7afc7d55a5218f409d119658)