compositor: make GL_EXT_read_format_bgra optional

Some GL implementations do not provide GL_EXT_read_format_bgra
extension.

Set a glReadPixels format based on whether the extensions is supported
or not, and use that format in all backends.

Add RGBA->BGRA swapping copy to screenshooter to keep the shm buffer
data format as BGRA.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
diff --git a/src/compositor.h b/src/compositor.h
index e381e66..93284c5 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -223,6 +223,7 @@
 	PFNEGLDESTROYIMAGEKHRPROC destroy_image;
 
 	int has_unpack_subimage;
+	GLenum read_format;
 
 	PFNEGLBINDWAYLANDDISPLAYWL bind_display;
 	PFNEGLUNBINDWAYLANDDISPLAYWL unbind_display;