First commit of CMakeLists.txt

Ported directly from Makefile.am, so mostly in the same order, with
plenty of artifacts.

Things to complete;
 * get capnp_test to link; currenly disabled in a if(0) block
 * configure cpack to output the files for a package
 * cleanup what remains