Use pthread_once to call bindtextdomain only once

Calling bindtextdomain everytime in discid_new incurs a little overhead. If
pthread is available, we can ensure with pthread_once that bindtextdomain is
called exactly once.

The autoconf function AX_PTHREADS is available from autoconf-archive. In cmake
FIND_LIBRARY(Threads) is used to find pthread.