wayland: decouple wl_buffer from frame
wayland: decouple wl_buffer from frame

This patch takes out the wayland's buffer from the the frame structure. The
buffer is queued to wayland and destroyed in the "release" callback. The
frame is freed in the surface's "done" callback.

In this way a buffer may be leaked but not the whole frame structure.

- surface 'done' callback is used to throttle the rendering operation and to
  unallocate the frame, but not the buffer.
- buffer 'release' callback is used to destroy wl_buffer.

Original-patch-by: Zhao Halley <halley.zhao@intel.com>
* code rebase
* kept the the event_queue for buffer's proxy

Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=749078

GStreamer/gstreamer-vaapi,gbeauchesne/gstreamer-vaapi,01org/iotg-lin-gfx-gstreamer-vaapi,gbeauchesne/gstreamer-vaapi,01org/iotg-lin-gfx-gstreamer-vaapi,01org/iotg-lin-gfx-gstreamer-vaapi,CapOM/gstreamer-vaapi,gbeauchesne/gstreamer-vaapi,ceyusa/gstreamer-vaapi,ceyusa/gstreamer-vaapi,CapOM/gstreamer-vaapi,CapOM/gstreamer-vaapi,GStreamer/gstreamer-vaapi