surface: Add vmethod to get buffer age

The reported age comes as the number of frames since the backing
surface was last rendered to, 0 meaning that the surface is brand
new.
wayland: Implement get_age() on SHM surfaces

Being single-buffered ATM it reports 1, unless the backing
surface has been just created.
wayland: Implement get_age() on EGL surfaces

This uses the EGL_EXT_buffer_age extension if available, the
value is cached as multiple age checks might happen on the
surface at rendering time. If the extension is not available,
0 is returned so the surface can be fully rendered.
surface: Store a history of damaged areas

The history list length is hardcoded to 3 to allow for up to
triple-buffered surfaces, the damaged areas are stored in device
space coordinates and transformed back to user space coordinates
when composing the clip mask.

At the time of rendering, the clip region is composed as an union
of all damaged areas since the surface was last used. If the buffer
age is too new (0) or too old (> 3), the whole surface is damaged
so it can be entirely redrawn.

Also, the actions to apply the clip on the cairo_t and get a
cairo_region_t have been split, MechWindow additionally uses this
to set the push_update() region.
surface: remove need_full_refresh() API

This is fully replaced now by the get_age() vmethod. Additionally,
remove now unneeded cairo_push_group/pop_group() pair.
wayland: Use eglSwapBuffersWithDamageEXT() on EGL surfaces if available

This call lets us define a list of damaged rectangles, instead of swapping the
entire EGL buffer altogether. This way both EGL and SHM surfaces share the same
invalidation/redrawing behavior.
stage: Fix surface bookkeeping

The qdata set on the surface's root area was not being unset
on stage finalization. Unset that as the area may survive the
stage if extra references are kept.
stage: Minor cleanup, call internal equivalent function

No need to call the MechArea equivalent function when it calls
underneath a MechStage function we have at hand.
stage: confine the start_from_parent hack to _mech_stage_invalidate()

This is about the only usecase where it may still make some sense, as
transformation matrix changes don't necessarily imply redrawing the
surface itself.
stage: Make smarter upwards invalidation of surfaces

Instead of transforming from the invalidated area coordinates at
each surface, coordinates are transformed as surfaces are iterated.

In order to reduce the damaged rectangles reported on the toplevel
surface, the invalidated region also gets clamped as intermediate
clipping areas are found.