Setup cmake.

This removes the Makefiles, and adds CMake support to generate the Makefiles.