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: Cache shader uniform locations

Instead of continuously calling glUniformLocation each time we have
flushed, cache the uniform locations in the shader object.