opengl: Fix usage of eglCreate/DestroyImage
The implementation was inconsistent between create and destroy. EGLImage creation and destruction is requires for EGL 1.5 and up, while otherwise the KHR version is only available if EGL_KHR_image_base feature is set. Not doing these check may lead to getting a function pointer to a stub, which is notably the case when using apitrace.
Fixes #1389 (closed)
cc @daniels
Edited by Nicolas Dufresne