This patch allows user to specify that socket binding can fail. On IPv4 there
is a ip_nonlocal_bind sysctl that can be set, however for IPv6 there is not
this call and it is unlikely to be implemented kernel-side.

Fixes PowerDNS/pdns#344
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
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.
prevent duplicate slave notications caused by different ipv6 address formatting
aviod address truncation in doNotifications
add toMasks and clear to NetmaskGroup class and use it
add only-notify option
fixes #454
closes #778
partial fix #949
add also-notify option
fixes #949
catch ComboClass exceptions in communicator
Merge branch 'master' into so-reuseport
merge with origin