fixes PowerDNS/pdns#650

The attached patch changes the distributor code in the following ways:

1) Remove (as far as i can see) unused functions which allow for the fetching of the answer from an answers queue. I struggle to understand why this would ever be useful compared to having a callback; it also reduces code complexity and removes some locks. Also allows (2):
2) Split into 3 classes - the new ones being SingleThreadDistributor and MultiThreadDistributor - removes some of the conditional statements. It also means that in distributor-threads=1 mode, NO additional distributor threads are forked (unlike the existing code), and the class will also use less memory and generally be more efficient.

This has been tested in that the pdns server starts up and answers questions correctly in both modes, it's more of an RFC attempt to clean up the code a bit.
fixes PowerDNS/pdns#666

SO_REUSEPORT is available on various bsd operating systems as standard, and also as a linux kernel patch from Google. It allows

1) Running 2 powerdns processes concurrently so that you can restart powerdns without loosing any packets
2) (the main purpose for my writing this patch) On linux with a patched kernel removes contention from many threads using a socket. In my tests this improves performance with a packet cache from 300kqps to 1mqps

If the SO_REUSEPORT call is available, the attached patch causes each receiver thread to open a new socket for connections which allows each thread (on linux) to operate at full speed rather than waiting on a slow socket. It should fail nicely ie if the call is not available at either compile time or run time it will just use the initially created socket.

Was merged in to linux 3.9 series - see https://lwn.net/Articles/542629/ for more information
rebase to HEAD
mutex lock the g_localaddresses as under very rare conditions it can segfault at startup when initializing many receive threads with many addresses
Merge branch 'master' into so-reuseport
Merge branch 'so-reuseport' of ssh://github.com/mzealey/pdns into so-reuseport
more changes
fixes PowerDNS/pdns#666

SO_REUSEPORT is available on various bsd operating systems as standard, and also as a linux kernel patch from Google. It allows

1) Running 2 powerdns processes concurrently so that you can restart powerdns without loosing any packets
2) (the main purpose for my writing this patch) On linux with a patched kernel removes contention from many threads using a socket. In my tests this improves performance with a packet cache from 300kqps to 1mqps

If the SO_REUSEPORT call is available and the reuseport config option set to yes, the attached patch causes each receiver thread to open a new socket for connections which allows each thread (on linux) to operate at full speed rather than waiting on a slow socket. It should fail nicely ie if the call is not available at either compile time or run time it will just use the initially created socket.

Was merged in to linux 3.9 series - see https://lwn.net/Articles/542629/ for more information
Merge branch 'master' into split-distributor
Remove AnswerData.created time field as it doesn't seem to be referenced anywhere and the time() call seems to take about 1-2% of process time under high load.
Merge branch 'master' into so-reuseport
merge with origin
merge from master
update pdns.conf
There are certain situations in which getAuth() may want to be overridden by a
backend for performance reasons. The attached patch converts getAuth() into a
virtual backend function. The default is for no change in functionality. In my
tests this leads to very significant performance improvements under certain
situations

fixes PowerDNS/pdns#581
Merge branch 'master' into backend-getauth
kill getAuth function that keeps reappearing
note innodb/binlog issue for 3.3.1
set binlog_format='ROW' if (gmysql-)innodb-read-committed is enabled
add trap handler to start-test-stop