Added .gitignore for Ninja build system dependency-cache and log.
Merge pull request #1084
Make ninja a global template.

Amends #1084