Fix out of tree build
Conditionalize building GLX and EGL tests and headers.

Note that the generated code is still generated, they just aren't
built and installed.  The goal with that is that someone could take
the built .c and .h files and drop it into their own project, if they
want to avoid shared libs.
Conditionalize building the EGL and GLX dispatch code.
Move GLX/EGL dispatch code using those API types to separate files.

The dlopen bits are left in place, but the functions required the
types, and in the case of EGL, the types require that the platform
header actually exists.