collect CMakeLists.txt files together

Instead of building a load of little internal static libraries, build a
single shared library. This has two advantages:

- the list of sources are in one place; and
- the code is compiled with -fPIC appropriately

It also makes the amount of build infrastructure that a new coder has to
grok far smaller.

Fixes #2.
Merge pull request #6 from csrf/restructure-compilation

collect CMakeLists.txt files together