opengl backend should preserve fbo contents when resizing

At the moment, when we change the size of the backing, we do an almost full gl_init() which clears the textures and fbos.
This makes the screen flicker a little because we have to wait for the next frame before we can paint the actual contents, unlike the pixmap backing which paints the old backing contents onto the new one.

A patch is attached which detects screen size changes and tries to avoid clearing the buffers, but this leads to buffer bleeding on the edges of the old dimensions!? (screenshot also attached)

Another thing we should be able to do is to paint both the fbo and the backbuffer at the same time, instead of painting onto the fbo then doing a full update of the backbuffer from the fbo using present_fbo. Or at the very least, we should pass the coordinates of the region to paint rather than painting the whole window!