Remove useless remnants of having used autoscan to generate the build system.

Remove checks for programs that are not used, remove checks for
library headers that are not conditional, and for types, and for
functions that are not replaced.
Fix open(3) call with _FORTIFY_SOURCE.

The mode parameter is not optional when O_CREAT is passed, so pass a
default of 0644 to it.
build: use a non-recursive top-level Makefile.

This avoids entering a subdirectory as first thing, and is better
practice with autotools.
build: enable foreign automake flavour.

This allows to remove the 0-sized and autogenerated top-level
"documentation" files that are required in the default GNU flavour.
Update .gitignore file.
build: distribute README.md and COPYING.
build: remove config.h.

The config.h file is too easy to misuse, and since the checks are now
very limited, there is no reason not to just use CFLAGS to pass the
few definitions that are actually used.
build: use non-deprecated libtool macro.
build: check for system extensions during ./configure.

This avoids defining _GNU_SOURCE unconditionally, and instead use
whichever system extensions apply to the current host.
build: include private headers in the list of sources.

This makes sure that 'make dist' works as intended and contains all
the required files.
Remove the duplicate internal src/aribb24/md5.h header.
Move internal headers out of the src/aribb24 directory.
Mark tables static when they are not used outside of their translation unit.
Mark function static that is only used in the translation unit.
Remove unused apply_drcs_conversion_table function.
Merge pull request #1 from Flameeyes/master

Build system cleanup and improvements