Don't run configure tests for threading if disabled.
If the user passes --disable-threads, we shouldn't run all the
configure tests to probe threading system characteristics.
Like with the conditional NLS bits, we create a local "dx-threadlib"
module which uses conditional dependencies to pull in the actual
threading modules.
We additionally have to monkey patch gl_MBRTOWC which hoists the
threading library probes out of the conditional, not so great
(we have disabled the multithread support in gnulib's mbrtowc
replacement anyway) -- this can be done in the new module too.