test: Don't have dangling symlinks in tests (for msys)

There are 2 reasons for this:
  * Under windows, ln() must determine whether the target is a directory or a
    file before creating the link.
  * msys doesn't handle dangling NTFS symlinks well (for example 'ls' will abort
    at that point, claiming the file doesn't exist).

So I have reordered commands to make sure our symlinks don't dangle from the
time of their creation.

Signed-off-by: Michael Geddes <michael@frog.wheelycreek.net>
test: Factor abspath_of_dir for testing 'absolute paths'

Signed-off-by: Michael Geddes <michael@frog.wheelycreek.net>
test: Implement mingw abspath_of_dir

needed to translate /c/ -> c: for comparison.

Signed-off-by: Michael Geddes <michael@frog.wheelycreek.net>
test: Factor out 'check_symlink' for stash tests

Required by msysgit while the msys core does not handle reading NTFS
Symbolic-Link Reparse Points.

Signed-off-by: Michael Geddes <michael@frog.wheelycreek.net>
test: Override 'check_symlink' to work with incomplete mingw

Signed-off-by: Michael Geddes <michael@frog.wheelycreek.net>
contrib: make git-new-workdir work with windows symlinks.

Required for tests to work.

Signed-off-by: Michael Geddes <michael@frog.wheelycreek.net>
test: Differentiate ability for gnu utils to handle symlinks from git

t7800 failed under symlink enabled msysgit without symlink enabled perl/msys

Signed-off-by: Michael Geddes <michael@frog.wheelycreek.net>