Add gl error flushing helper function
Add egl-flush-error-calls where required
Merge pull request #616 from matthiasbeyer/fix-gl_error_usage

Add egl-error-flushing
Add type & stubs for egl type interface
Set buffer type dynamically on set_resource()
Add implementation for egl_transfer2texture()
Add error-checking return