WINDOWS_BUILD: Fixed race condition which can occur during a parallel build creating the .git-commit-id.h file

Also, make a best effort attempt to populate the .git-commit-id file when installing the git-hooks on a newly cloned repository