Switch to CMake

Switch to CMake for build. Understand that both test and dist are currently broken until re-implemented properly with CMake.