TS-1768: prefer AC_SEARCH_LIBS to AC_CHECK_LIB

AC_SEARCH_LIB should be preferred to AC_CHECK_LIB because the former
does not link the library under test the symbol is already present.
AC_SEARCH_LIBS conveniently appends the library to LIBS which makes
the Makefile.am simpler.

Unfortunately, our check for libresolv depends on the AC_CHECK_LIB
behavior. I didn't change this because the extensive use of macros
to rename API in libresolv makes the configuration tests more complex
that I wanted to deal with in this bug.
TS-1879: make Ptr conversion constructor explicit
TS-1872: minor cleanup to compiler flag handling

  - Prefer AS_IF to the case statement.
  - Test for directories before adding them to the linker path.
  - Error out if we are building on Darwin with a non-clang compiler.
  That's almost certainly an ancient version of gcc that won't work.
TS-1880: add pthread_setname_np support
TS-1053: fix sdpy and esi plugin convenience libraries

Rename the convenience libraries to avoid potential name conflicts.
Make sure to use noinst_ automake prefixes because we don't want
these to be installed.
TS-1053: fix missing threadKey symbol in combo_handler
Try to fix Solaris wclear macro build breakage
TS-1881 TS can crash on regex URL lookup
Spell ifdef correctly
Move esi test files to the test library
TS-1444 Fix URL lookup with regex via web interface