Started writing cmake support.

Currently this only supports gcc builds, but I'll continue working on
it to support the rest as well. The problem here seems to be the
src/Platforms directory, where I need to find a neat way to solve that.
Add support for config flags supported by automake to cmake.
Support installation of headers and libraries using cmake.