Merge pull request #1 from mikael-s-persson/feature/templight2_mp_fork

CMake config + a number of small fixes
Fixed warnings and unusual casts
Applied proposal to fix #2
Relying solely on CMake
Using Qt5 if available and falling back to Qt4
Restructured the cmake file a bit, just to be in "good style" (options -> compiler-checks -> package-finds -> list sources -> create targets).