API: Replace HTTP Basic auth with static key in custom header

Given that the key is sent in a custom header, this should prevent
any possible CSRF attacks.

Fixes #1769.
Replace autoconf variable with automake variable
Add libraries with _LDADD
Add libdl to _LDADD instead of _LDFLAGS
Break up long lines
Don't add generated sources to _SOURCES
Conditionalize sqlite libs
Move some stuff up

No functional changes
Remove unneeded flags from tools
Fix compiling mydns module without gmysql module

This fixes the last case in #544:
https://github.com/PowerDNS/pdns/issues/544#issuecomment-32457187

It's still a dirty hack, and we should pull the parts that mydns
and gmysql have in comming into a common library.
We don't use librt for anything
Merge pull request #1803 from rubenk/drop-librt

We don't use librt for anything
Merge pull request #1790 from rubenk/cleanup-pdns-makefile-am

Cleanup pdns makefile am
Only add LUA_CFLAGS and LUA_LIBS if we have lua
distribute pdns.conf-dist again, thanks @rubenk
Merge pull request #1796 from rubenk/fix-compiling-mydns-as-module

Fix compiling mydns module without gmysql module
Revert "Fix compiling mydns module without gmysql module"

This reverts commit c9df4fb94c49d73c06ea99223ce9ed37cbb9498b.
travis: enable verbose builds, fixes #1778
cleanup lua backend test dir
Cleanup linking with YaHTTP

Replace the hardcoded paths with variables.