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.  This partially reverts the change,
but it keeps the concept of checking for the special device names
using string lists as a better way to detect if a path should
not be manipulated.

Finally, it is not documented clearly in the Windows API, but
GetFullPathNameW() actually may require a string longer than the
actual output length, so we use a temp buffer that is twice as
long.  Windows is able to resolve the relative path, even if
the relative path is longer than 260 characters, since the
function doesn't actually check for a valid name. There is a bit
of a red herring that it is limited to MAX_PATH characters, and
while that may be true of the input string (such as, you cannot
have a relative path longer than MAX_PATH), the temporary space
needed may be longer, but the output still needs to be less than
MAX_PATH characters without using "\\?\".

Signed-off-by: Doug Kelly <dougk.ff7@gmail.com>