Merge pull request #16 from tribal-tec/master

Update CMake, cppcheck fixes
Update CMake subtree and generated files
Merge pull request #17 from eile/master

Update CMake subtree and generated files
Fix racy unit tests, discovered by Jenkins