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.
Don't look in system include paths for pdns headers
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.
travis: build the lua backend
Merge pull request #1797 from rubenk/dont-look-in-system-include-paths-for-pdns-headers

Don't look in system include paths for pdns headers
Merge pull request #1795 from rubenk/travis-compile-luabackend

travis: build the lua backend
We don't use librt for anything
Remove extraneous bracket from configure.ac
Merge pull request #1801 from rubenk/fixup-configure-error

Remove extraneous bracket from configure.ac
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