debian: Remove unused files, targets
nit, thanks @nivadis
Handle missing Lua when lua backend is enabled

The first case handles ./configure --with-modules='lua' --with-lua=no.
I don't know who would do such a thing, but better handle it in
./configure than bailing out later with a compiler error.

The second case handles ./configure --with-modules=lua when you don't have
Lua installed, which I actually observed since I assumed enabling the
lua backend would be enough, and I did't have the lua headers on my
system.

Fixes #1618
Don't override the user's FLAGS

Fedora for instance sets -fstack-protector-strong
but we override that with -fstack-protector, which is less secure

Ideally we never touch CFLAGS, CXXFLAGS and the like but fixing
that is an exercise left for the reader.
Merge pull request #1786 from zeha/cleanup-debian-dir

debian: Remove unused files, targets
Set BOOST_CPPFLAGS and THREADFLAGS globally

Should fix #1523
Merge pull request #1789 from rubenk/dont-override-user-cflags

Don't override the user's FLAGS
Merge pull request #1788 from rubenk/handle-missing-lua-better

Handle missing Lua when lua backend is enabled
closes #1785 - compile on platforms w/o SO_TIMESTAMP
Merge branch 'master' of github.com:PowerDNS/pdns
Link binaries explicitly with libpthread if needed
Darwin has pthread in libc

Fixes the following warning:
clang: warning: argument unused during compilation: '-pthread'
Merge pull request #1791 from rubenk/reduce-nr-of-boost-cppflags

Set BOOST_CPPFLAGS and THREADFLAGS globally
Merge pull request #1792 from rubenk/fix-unused-argument-warning-on-osx

Fix unused argument warning on osx
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