fix [2870926] Issue 9802: EGL wrapper has not been implemented correctly for eglQuerySurface().

rework how our EGL wrapper manages EGLConfig:

- we now store the EGLConfig with the EGLSurface and EGLContext
  so that we can have easy access to it from eglQueryContext
  and eglQuerySurface.

- EGLConfig now are an index into a sorted table of egl_config_t,
  we use a binary search to retrieve our EGLConfig (the index) from
  the implementation's EGLConfig.

- egl_config_t keeps track of the implementation's index,
  EGLConfig and CONFIG_ID as well as our CONFIG_ID.

In many ways, this implementation is simpler and more robust, as it doesn't
assume anything about the number of implementations nor what EGLConfig is
made of (the previous code assumed EGLConfig didn't usem more than 24-bits).

Change-Id: Id5abe923aacb6e1fd2b63bd8c15d7b04ae824922
1 file changed