Improve pthread library detection.
* configure.ac: Reorder some code. Improve pthread test to take libc in account. Generate NPTH_CONFIG_LIBS from tests. * src/npth-config.in: Use NPTH_CONFIG_LIBS. * w32/npth-config.in: Ditto. * tests/Makefile.am (AM_CPPFLAGS, AM_LDFLAGS): Don not pass -pthread.