BUILD: Add scripts to parse all Makefile.am and build with CMake.

CMake itself parses the configure.ac file to get the list of Makefile.am, and
parses each Makefile to get the libraries/binaries and their sources and link
dependencies.

The target are registered in CMake and it can be used to generate whatever
CMake can generate.

No change is required regarding autotools, and as long as the Makefile.am files
stay as simple as they are, the CMake script that parses them should handle any
source addition/removal.

There's still duplication in term of library checks and platform flags, which
might be more difficult to replace, but this is probably not going to change
that often.
BUILD: Enable testing support.