Change c-ares to tdns in output of /znc version
Update Csocket to e00323f9f18

This breaks API for Csock::SockError()!

Signed-off-by: Uli Schlachter <psychon@znc.in>

Conflicts:
	Csocket.cpp
	IRCSock.cpp
	IRCSock.h
	src/Socket.cpp
CHTTPSock: Remove some useless member methods

The defaults from Csock / CSocket will be fine.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Update to Csocket 6da41d339f

Fixes build on OS X.
Use @t=time instead of @time for server-time capability.

It's incompatible change, but it makes protocol more flexible.
Version with @time was never released anyway.
TDNS: Fix few incompabilities with last Csocket.

Conflicts:
	Csocket.h
	IRCSock.cpp
	IRCSock.h
Threaded DNS: Remove TDNS mutex

POSIX actually guarantees for us that this white is atomic and thus a partial
write is not allowed.

Signed-off-by: Uli Schlachter <psychon@znc.in>

Conflicts:
	Socket.cpp
threaded DNS: Remove an unneeded function

This inlines the function into its only caller.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Fix AX_PTHREAD to actually work

At first the test was failing with the following error due to my CXXFLAGS:

conftest.cpp:20:37: error: parameter 'a' set but not used
[-Werror=unused-but-set-parameter]

Then it figured out that -lpthread works, but I wondered why the test for
"-pthread" still fails. This is where I realized that it is testing with C++
compiler, but puts its stuff in $CFLAGS which is just ignored. So a little
search-and-replace later, this now uses $CXXFLAGS.

At this point the results of the tests looked good, but znc failed to link,
because it didn't use -pthread when linking. One little "PTHREAD_LIBS=" later,
that problem was also gone and I can finally commit this. Yay.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Threaded DNS: Use a thread pool

When a DNS thread is done with its lookup, instead of existing immediately, it
now waits for another DNS lookup to do instead. This avoids the cost of
starting/stopping threads all the time.

To make sure that (for whatever reason) the number of waiting threads doesn't
get too high, threads exit if there are more than two DNS threads idling around
with nothing to do.

Fixes #132.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Threaded DNS: Handle spurious wakeups

As DarthGandalf noticed, POSIX allows spurious wakeups from pthread_cond_wait.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Block all signals in DNS threads

A DNS thread should never handle any kind of signal. The main thread is
responsible for handling signals and it does so without any kind of locking.

Signed-off-by: Uli Schlachter <psychon@znc.in>

Conflicts:
	Socket.cpp
c-ares is no longer a optional dependency
Remove references to CAres from mod{python,perl}
Clear channel buffers if keep buffer is disabled and we're online
Add SSL/IPv6/DNS info to znc --version
Csock: able use non-int number of secs for timer.

This patch happened in upstream csocket too, so update won't break
anything.
Move TZ-related code to own place.

Conflicts:
	User.cpp
Deprecate TimezoneOffset

Conflicts:
	User.cpp
Show list of timezones in webadmin.

Conflicts:
	Utils.cpp