tests/gears: Ensure we don't use unavailable GL resources
tests/gears: Ensure we don't use unavailable GL resources

We need to check on realize if we have access to a GL context, before
calling GL functions. We use gtk_gl_area_get_error() for that.

We also need to tear down the resources during unrealization, instead
of leaking them.

Adamovskiy/gtk,jadahl/gtk,jadahl/gtk,grubersjoe/adwaita,jadahl/gtk,davidgumberg/gtk,chergert/gtk,jadahl/gtk,davidgumberg/gtk,Adamovskiy/gtk,jadahl/gtk,Adamovskiy/gtk,grubersjoe/adwaita,jigpu/gtk,chergert/gtk,alexlarsson/gtk,alexlarsson/gtk,chergert/gtk,grubersjoe/adwaita,grubersjoe/adwaita,Adamovskiy/gtk,grubersjoe/adwaita,jadahl/gtk,jigpu/gtk,jigpu/gtk,jigpu/gtk,chergert/gtk,alexlarsson/gtk,Adamovskiy/gtk,alexlarsson/gtk,chergert/gtk,jigpu/gtk,Adamovskiy/gtk,Adamovskiy/gtk,jadahl/gtk,chergert/gtk,alexlarsson/gtk,chergert/gtk,grubersjoe/adwaita,grubersjoe/adwaita,chergert/gtk,jigpu/gtk,jigpu/gtk,grubersjoe/adwaita,alexlarsson/gtk,davidgumberg/gtk,jadahl/gtk,davidgumberg/gtk,davidgumberg/gtk,davidgumberg/gtk,jigpu/gtk,alexlarsson/gtk,davidgumberg/gtk,alexlarsson/gtk,Adamovskiy/gtk,davidgumberg/gtk