wayland: Report error when trying to stack subsurface incorrectly

Don't allow a client to stack a subsurface next to a subsurface with
another parent, or to a non-parent non-subsurface surface.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=705502
wayland: Make wl_subsurface.set_position properly synchronized

The position set by wl_subsurface.set_position should be applied when
the parent surface invokes wl_surface.commit.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=705502
wayland: Make wl_subsurface.place_(above|below) properly synchronized

The placement set by either wl_subsurface.place_above or
wl_subsurface.place_below should be applied when the parent surface
invokes wl_surface.commit.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=705502
wayland: Support wl_subsurface.set_sync/set_desync

Implement support for synchronous subsurfaces commits. This means that
the client can, by calling wl_subsurface.set_sync, cause its surface
state to be commited not until its parent commits.

This will mean there will be will potentially be one more surface state
(regions, buffer) at the same time: the active surface state, the mutable
pending surface state, and the immutable surface state that was pending
on last surface commit.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>

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