dnsproxy uses sendmsg instead of sendto
dnsproxy.cc and nameserver.cc use addCMsgSrcAddr() to add a source address control message before sendmsg
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/657

I noticed this as a result of the changes in 3.2 whereby each receiver gets its own distributor - whenever the dynhandler calls ->getBackend() it will only find the one in its' current thread, so reload won't propergate to backends within other threads.

However, I suspect this condition has always been around as a race - if I have multiple distributors and I call reload; one thread is issuing reloads while all the other backend threads are currently executing (potentially). I guess if you call reload in previous versions on a highly loaded server with multiple backends you could probably get it to crash.

The attached patch changes it so that each backend has a variable which is changed to signal that a reload or rediscover has been requested. When processing gets to an appropriate point ie before it next queries the backend database, such an operation will be run. Note that it is not run in ::get as we don't want a backend to be reloaded between performing a lookup and getting the records.

This patch means that reload/reinitialize are not done straight away as in previous versions, but on a moderately loaded server this should not be a problem as they will be performed the next time a backend is called.
rebase to HEAD
Terminate pdns process after SIGINT
upgrade polarssl to 1.3.2; drop testsdir; add distdir target; make sure make check does not abort
again add -fPIC so we can build PIE executables, for better security
nit
Merge pull request #1167 from Habbie/polarssl-update

Polarssl 1.3.2 update
nit
make our bash invocations more portable
use PATH for socat
On testing with large numbers of unknown domains the send-root-referral
argument query amounted to quite a high proportion of CPU time. This will cache
it to reduce this overhead as is already done with a number of variables.
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.
don't skip remotebackend unix tests
ok, so it turns out that poll, select and a few other system calls can return EINTR when we receive and interrupt, and we need to manually restart. man 7 signal makes for good reading on this case, as does http://blog.reverberate.org/2011/04/eintr-and-pc-loser-ing-is-better-case.html
add rest of 3.3.1 commits to draft changelog
remove experimental status from direct-dnskey
update debian pdns.conf