refspec: short-circuit non-pattern refspecs on transform

When transforming a non-pattern refspec, we simply need to copy over the
opposite string. Move that logic up to the wrapper so we can assume a
pattern refspec in the transformation function.
refspec: support asterisks in the middle of a pattern

We used to assume a refspec would only have an asterisk in the middle of
their respective pattern. This has not been a valid assumption for some
time now with git.

Instead of assuming where the asterisk is going to be, change the logic
to treat each pattern as having two halves with a replacement bit in the
middle, where the asterisk is.
Add a CHANGELOG entry for refspecs with asterisk in the middle
in_addr is defined in <Winsock2.h>, include before <ws2tcpip.h>
strnlen() is only available from Visual Studio 2005+
_stat64 is a function, __stat64 is the structure
Variadic macros is only available from Visual Studio 2005+
qsort_r is only available from Visual Studio 2005+
Secure CRT is only available from Visual Studio 2005+
Define IO_REPARSE_TAG_SYMLINK if its not defined by WinNT.h
ssh: provide a factory function for setting ssh paths

git allows you to set which paths to use for the git server programs
when connecting over ssh; and we want to provide something similar.

We do this by providing a factory function which can be set as the
remote's transport callback which will set the given paths upon
creation.
merge: don't open COMMIT_MSG unless we need to append conflicts
Properly report failure when expanding a packfile
checkout: fix docs formatting for the options
Merge pull request #2457 from ethomson/merge_fix

merge: don't open COMMIT_MSG unless we need to append conflicts
Merge pull request #2468 from Airbitz/pack-error-reporting

Properly report failure when expanding a packfile
Merge pull request #2465 from libgit2/cmn/refspec-start-middle

Support refspecs with the asterisk in the middle
Merge pull request #2463 from libgit2/cmn/ssh-factory-for-paths

ssh: provide a factory function for setting ssh paths
Merge pull request #2466 from jacquesg/win2003-platform-sdk

Windows compatibility fixes
Merge remote-tracking branch 'upstream/master' into cfnetwork