Initial infrastructure for entrypoint rewriting

Remove references to GLX_X86_READONLY_TEXT #define; libglvnd always
assumes writable text sections are available.
More hacks
More hacks
Yet more hacks
Plumbing for _glapi_stub_override() and friends
[glvnd_pthread] Track whether single-threaded or multi-threaded imports are being used
[GLX ABI] Assign each vendor library a unique ID tracked by GLdispatch

This will come in handy later when implementing support for patching
entrypoints, since we can use the vendor IDs to track which vendor
currently "owns" the entrypoint code.
Plumb entrypoint rewriting through GLdispatch API
Fix stub_restore() to dispatch to last slot if stub currently doesn't have a slot
Add preliminary support for overwriting libGL, libOpenGL entrypoints
Export pthreads imports from libGLdispatch, rather than libGLX

This is needed so other libraries which depend on GLdispatch (such as
libGL and libOpenGL) can initialize GLdispatch independently of libGLX.
remove a hack
[GLdispatch] Remove _glapi_stub_override() and friends
Plumb entrypoint rewriting through to the vendor library ABI
[GLdispatch] Try to restore the default patch on lose current
[tests] Add testpatchentrypoints test

This tests the entrypoint patch/unpatch functionality.  A later change
could verify this functionality for multithreaded applications.
Fix comment
Misc. fixes
Fix STATIC_ASSERT() macro for older compilers
Refactor entrypoint patching API to reduce offset lookup overhead

- Pass stub type and size information only once to the vendor, rather
  than once for every entrypoint that will be overwritten.

- Instead of requesting the vendor library overwrite every static and
  dynamic stub currently in use by libglvnd, implement a hook for the
  vendor library to explicitly request offset information for
  entrypoints it is interested in rewriting.  Some vendors may only want
  to generate code for a small subset of the API, and in general vendors
  won't care about generating code for functions that they don't
  implement.

  Currently libglvnd loops through each static and dynamic stub and
  requests that the vendor library patch it; if the vendor library is
  using a naive dispatch lookup implementation that loops through an
  array, the complexity of completing all patches is approximately
  O(n**2) where n is the number of entrypoints that needs to be patched.
  By switching to an active dispatching model, this is reduced to
  approximately O(n * log(n)), since stub_find_public() uses bsearch()
  to lookup static stubs.

- Track changes to the stub list by adding a monotonically increasing
  gen#; if the stub list hasn't changed, subsequent patch requests may
  skip the offset lookup step.