Clean up autoconf build system

This branch tries to modernise the build system and fixes some glitches. Especially the compiler configuration using the CC configuration variable did not work properly before.

To adapt some more of the GNU autotools, the README now recommends calling ```autoreconf```, which in turn regenerates the config.h.in template using autoheader. These are some first steps to align the build system with standards expected from autotools-based packages.