[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.
Just check once at include time, here. Then all the other functions can check GITDIR-NOTFOUND and return immediately. Saves a lot of code.