Build and test with CMake

*Replaces* the autotools-based build system with a CMake-based build system. CMake was found to be more portable. It can generate Makefiles, MSVC project files, and more. Now that we found how to use CTest with Check, I believe it is better to use CMake.