Started writing cmake support.

I had some problems with compiling this with Visual Studio 2012,
the tool to convert from 2010 to 2012 seems to work, but got a couple
of compilation failures. Since cmake supports "everything", Linux, mac,
VS 20xx etc. I decided to instead start using that.

If this is something not only I'm interested in, this could potentially
remove the need to maintain all the different build phases that we have
now.

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.
Make a CHECK_THROWS macro, which tests that we throw an exception.