Add check for __thread in configure.
Use proper AC_DEFINE
Add configuration for rrdcached address