Switch build system to autoconf + buildsys.mk

This greatly increases portability, as platform defines are replaced
with feature checks. It can already build namecoind, though the checks
in configure.ac could be expanded a little.

Support for Namecoin-Qt is completely missing, but will be added
shortly.