gl: Separate framebuffer bind from destination selection

Disentangle the action of binding the framebuffer from setting the
destination. This straightens up the code a bit and avoids some redundant
operations (such as reacquiring the context) when simply switching from
the multi-sample framebuffer to the single-sample framebuffer and vice
versa.
gl: Update transformation when surface size changes

In my previous commit I mistakenly removed the transformation matrix
update when cairo_gl_surface_set_size is called. This change restores
it.
gl: Bind the default framebuffer before calling gl{Read|Draw}Buffer

Fix more fallout from separating framebuffer binding from setting the
destination. In some cases it is sufficient to call
glDrawBuffer/glReadBuffer before binding the framebuffer, but the
masking-filling-stroking test of cairo-gl-smoke-tests fails if the order
is incorrect.
gl: Fix compiler warnings in the GL backend
gles: Switch default framebuffer destinations properly

Make _cairo_gl_context_bind_framebuffer handle different types of GLES
surfaces properly Since, the multisampling setting of a surface never changes
in for GLES, so the first thing we do when setting the destination is to
ignore the requested multisampling setting. This simplifies all
following logic.
directfb: Correctly chain up map-to-image/unmap to the image backend

Fixes the infinite recursion reported by jojo.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
directfb backend: Start working on making it usable again.

The current version makes it possible to run at least DirectFB WebKit
port. The code is highly incomplete and still misses a lot of
functionality to be really useful.

Signed-off-by: Peter Tworek <tworaz666@gmail.com>
More hacking on dfb cairo backend.

Signed-off-by: Peter Tworek <tworaz666@gmail.com>
directfb backend: Start getting the code into better shape.

Signed-off-by: Peter Tworek <tworaz666@gmail.com>