VCS plugin: fix cygwin compatibility in _find_vcs_dir

Use feature detection to disable a check on hard links count on
directories. This is an issue on cygwin because (stat $dir)[3] is
always 1.
VCS plugin: fix call to GitInfo

" which('git') " is now called just once instead of at every display
of the prompt in a Git directory.
Git plugin: use $shell_state->{GIT_DIR} if available

If someone (such as the VCS plugin) has already found the root of this
Git repo, use it!