build: Add call to AM_PROG_AR

automake complains about it otherwise when invoked with -Wall
/usr/share/automake-1.12/am/ltlibrary.am:
     warning: 'libdiscid.la': linking libtool libraries using a non-POSIX
/usr/share/automake-1.12/am/ltlibrary.am:
     archiver requires 'AM_PROG_AR' in 'configure.ac'
Update .gitignore
build: Remove redundant EXTRA_DIST

config-cmake.h.in is already listed in Makefile.am's EXTRA_DIST,
no need to have it as well in configure.ac (I'm not even sure this
is doing anything).
build: Move setting of automake options to AM_INIT_AUTOMAKE
build: Use noinst_HEADERS rather than EXTRA_DIST

This is more usual for a private header file.
build: Define per-OS automake conditional

They will be used in the next commits to conditionally defines
libraries/source files to be used depending on the platform we
are compiling for.
build: Use conditionals for OS-specific libraries

Depending on the OS, libdiscid may need to link with OS-specific
libraries. Now that we have per-OS automake conditionals available,
we can make use of those rather than forcing LIBS in configure.ac.
build: Use conditionals for OS-specific source files

OS-specific source files were defined in configure.ac through
AC_SUBST, and then they were forced to be dist'ed using
an EXTRA_ Makefile.am variable.
This is quite unusual, now that we have automake conditionals
for each supported OS, we can make use of them.
build: Move headers to libdiscid_la_SOURCES

Header files are sources as well, so we can list them in a _SOURCES
primary rather than in EXTRA_DIST.
build: Use per-target CPPFLAGS

We can set CPPFLAGS in libdiscid_la_CPPFLAGS rather than AM_CPPFLAGS
to be consistent with all the other libdiscid_la_XXXX variables.