Fix NPOT decoration texture binding

If the context does not support the NPOTTextureRepeat (i.e. GL_OES_texture_npot extension), wrapping must be set to CLAMP_TO_EDGE to prevent invalid texture mapping.

Change-Id: I3ededccc14a32188986529c14fa91161fb383cfc
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Remove the QWidget compositor example

The QWidget API isn't well fit for a Wayland compositor, and does
not have any advantage over a QWindow, which can also draw using
QPainter. Besides the current implementation doesn't work properly,
and no one seems to be interested in fixing it.

Change-Id: Id1c337506af48e1d1fdd8d14f0ed637d299702f3
Make QtWayland::Compositor subclass the generated wl_compositor class

Change-Id: If07c7ca86ef87f503e1e79663beb9b4ddbafd739
Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>

Conflicts:
	src/compositor/wayland_wrapper/qwlcompositor.cpp
[compositor] Avoid potential crash in compositor.

If we called disown on a buffer after it got destroyed we would
touch the m_buffer handle which was then invalid which would
crash.
Listen for the destruction of the focus surfaces' resources

With the new delete guard a QWaylandSurface survives for some time after
the destruction of its wl_resource, so have the wl_keyboard, wl_pointer and
wl_touch objects watch for the destruction of their focus surfaces to avoid
using them after the destruction

Change-Id: I2e998d86289288cfe78a45b068f6395c027253af
Check if the surface is valid before setting it as focus

A surface may get its resource destroyed and during the time it takes to
be destroyed it must not be set as mouse of keyboard focus.

Change-Id: Ic07503a0fc114ecdf2a6019a665064d8b89cd2f8
Rework the way buffers are used and rendered

The current way buffers are handled is sub-optimal. They are hidden
inside QtWayland::Surface and the actual renderer, be it QtQuick or
anything else, cannot get a direct hold of them, nor it can directly
control when the underlying textures are created or deleted.

The main additions in this commit are the splitting of the QtQuick
code path and the new QWaylandBufferRef and QWaylandBufferAttacher
classes.
QWaylandBufferRef allows a renderer to retain a reference
to a wl_buffer even after the underlying Surface discarded it.
That allows the renderer to directly decide when to destroy the texture
of the buffer.
QWaylandBufferAttacher is a pure virtual class which must be implemented
by the renderer. Instances of it will be assigned to the QWaylandSurfaces,
created. Its attach() virtual method will then be called when a new buffer
is committed to the surface. The renderer can then choose to immediately
create a texture or wait for some later time. It is its responsibility to
create and destroy the GL texture, it will not happen automatically.
This functionality is implemented for QtQuick in the new QWaylandQuickCompositor
and QWaylandQuickSurface classes.

Change-Id: I6fc1dd4638dd101f6c8e22cd645653bc28830c2a