Build with CMake

Instead of using a Makefile with hard-coded configurations
(e.g. Linux implies libstdc++), using CMake for
configuration.  CMake makes it (relatively) easy to check
for different warning flags and compiler bugs.