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

As the other PR has been closed because of branch rewrite stuff, here it is again for the record.

This is the same AutoMake parsing stuff as before so that the CMake build system is automatically kept (more or less) in sync with the Autotools one.

There also is a separate commit for unit testing with Catch and a sample test suite for the TransformationMatrix class.