Fix handling of long recursive paths

The commit in msysgit/git#86 attempted to better handle recursive
paths that would exceed MAX_PATH on Windows, since the paths would
be too long to fit in Git's buffers when expressed relatively,
but could easily fit when reduced back to a canonical path.  This
also adds a testcase that was lacking from the original commit that
attempts to describe the behavior.

Also, msysgit/git#111 attempted to work around a bug that
msysgit/git#86 introduced.  I have partially reverted the change,
but I kept its concept of checking for the special device names
using string lists as a better way to detect if a path should
not be manipulated.

Signed-off-by: Doug Kelly <dougk.ff7@gmail.com>