Create compilation database with cmake if project uses it

- Detect if the project uses cmake version > 2.85 in the build command
- If so then utilize cmake to create the compilation database instead of
  parsing it by hand and understanding the output
Merge remote-tracking branch 'github/master'