Threading-related fixes for GLdispatch
Created by: kbrenneman
Various fixes for thread handling in GLdispatch.
The code in mapi/u_current.c should use the glvnd_pthread interface instead of calling into pthreads directly.
Fix a few errors in the x86 TSD version of GLdispatch, where a second thread would try to use the context state from the main thread.