cmake: initial version of cmake build system files
split unittest class into header and cpp file
cmake: fix a few warnings and add an option to build unittests
cmake: add git revision updating for gen_version.h