framebuffer: check we have a draw/read_buffer before freeing
framebuffer: check we have a draw/read_buffer before freeing

When freeing a framebuffer stack it's possible to have entries with NULL
draw or read buffers so we should check that before calling
cogl_onscreen/offscreen_free. This fixes a crash with the wayland
backend when running conformance tests such as cogl-test-object which
never push a framebuffer.

collects/cogl,djdeath/cogl-android,Distrotech/cogl,gcampax/cogl,djdeath/cogl,djdeath/cogl,Distrotech/cogl,collects/cogl,spatulasnout/cogl,djdeath/cogl-android,gcampax/cogl,djdeath/cogl-android,gcampax/cogl,Distrotech/cogl,Distrotech/cogl,gcampax/cogl,spatulasnout/cogl,djdeath/cogl