wayland: protect against a possible crash

A SHM surface could go though the acquire/release cycle without
actually being rendered to, if this happens the first time a surface
is being rendered to, priv->cur_buffer could get to be invalid at
that point.
stage: check for the offscreen node data being != NULL when destroying it

OffscreenNodes are created with NULL data, which gets filled after checking
the requested surface type and other constraints imposed by the parent surface.
So at the time of destroying the node its data might still be NULL.
gl-box: Silence warnings if GL is just not available