Created a CMakeList configuration file to make building on any platform a bit easier.
Fixed a few warnings (c-style casts) and some Qt4-5 incompatibilities.
Renamed the protoc-generated files so that out-of-source builds don't get into a conflict with these stray files in the source directory.
Fixed a couple of easy-to-fix segmentation faults when trying to walk along an empty history.
Merge pull request #1 from mikael-s-persson/feature/templight2_mp_fork

CMake config + a number of small fixes