examples/gl_basic: Check if api is supported before dlsym'ing
examples/gl_basic: Check if api is supported before dlsym'ing

Check if the display supports the requested api before trying to dlsym
that api's library. Thus we avoid trying to dlsym a library that may not
be present on the system.

Improves error messages in `gl_basic cgl gles1` and `gl_basic cgl gles2`.

Signed-off-by: Chad Versace <a557f7f75bf28dc19ac99107f5cc7cd6b3fbdb1a@linux.intel.com>

waffle-gl/waffle,waffle-gl/waffle,janesma/waffle,yinquan529/waffle-gl-waffle,dcbaker/waffle,evelikov/waffle,fjhenigman/waffle,maurossi/waffle,evelikov/waffle,janesma/waffle,chadversary/waffle,waffle-gl/waffle,dcbaker/waffle,chadversary/waffle,waffle-gl/waffle,chadversary/waffle,yinquan529/waffle-gl-waffle,yinquan529/waffle-gl-waffle,maurossi/waffle,janesma/waffle,dcbaker/waffle,fjhenigman/waffle,maurossi/waffle,fjhenigman/waffle,evelikov/waffle