[RFC] Let homebrew formula find neovim git version

In https://github.com/neovim/neovim/pull/1267, neovim began using git commit date as part of alpha version string. This pull request fixs the issue that homebrew build cannot find .git directory to extract git information.
The patch may be little confuse. I created a new function to search git dir.