Switching to cmake.

Refactored the directory structure in the process.

Compiles, but a lot of feature tests are not done.