wayland: Implement double buffering in SHM surfaces

This was previously done implicitly via a cairo_push_group/pop_group()
pair, which was removed on cfc58f7bdd. So make SHM surfaces double
buffered.

The surface has normally 2 buffers at the same size, on resize or
congestion situations, those buffers may be disposed by the surface so
they're kept alive as long as the compositor keeps them. The surface then
replaces those disposed buffers with fresh ones, keeping the general
count of two.