Import a copy of dlwrap from libfips.

This is just cworth's code, reindented for this project.
Add a test for EGL and GLX returning different function pointers.

This is the case on the nvidia binary driver's GL, or when you've got
a system mixing nvidia binary GL and Mesa EGL.
Try to avoid looking up bootstrap functions in the wrong library.

Fixes the EGL-only subtest of egl_and_glx_different_pointers.
Try to use glXGPA() for core funcs if the current context is GLX.

Fixes the GLX-only subtest of egl_and_glx_different_pointers.  Now
what remains is dispatch tables for when you're actively using both.

Fixes #23
Refactor dispatch_common's EGL context detection code.

I want to reuse this from get_core_proc_address().
Avoid using eglGPA() for core funcs when the current context is GLX.

If you already had GLX loaded by epoxy, this wouldn't happen, but on
the first call, fallback cases might have taken the EGL path if EGL
was loaded.