Add XWayland API with Present support in mind.

The API enables to use the frame event and the buffer release event.
We can pend todo items that are functions which will be called when
the event is raised.

When a window is unrealized, all the todo items associated to the
window are called with special parameters, so the todo item can handle
this case differently.
Same when a Pixmap is destroyed.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Implements xwl_get_visible_parent_window.
This function is needed to get the parent window
that the wayland compositors sees.

If no parent window is seen by the wayland compositor
(unmapped, or root window is not in the parents, etc),
then the function returns NULL.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Present Wayland support

This uses the frame event to synchronise with the screen refresh.

Each window has its own msc count, like for the standard Present
implementation, but the msc count will always start at 0,
and no correlation is expected between the msc count of different
windows.

The msc count, and waiting a specific msc, rely on adding todo items
to the frame event. If never this fails, for example because
the window is not mapped yet, no synchronization will be done, and
the rendering will be as fast as possible.

If some conditions are matched, the Presented pixmap will be
exchanged ('flipped') with the window pixmap, thus avoiding a copy
and possible tearings.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
Change configure and Makefile to build XWayland Present support

Signed-off-by: Axel Davy <axel.davy@ens.fr>