Directory: Make sure the /* suffix uses correct slashes

When applying the /* wildcard suffix to a directory, make sure the
direction of the slash getting appended is consistent with the other
slashes in the path, i.e. /foo/bar and /foo/bar/ become /foo/bar/* and
similarly \foo\bar and \foo\bar\ become \foo\bar\*.

Change-Id: I44fcf7e97be65923a37aaed615ba5f4012756893
SystemTools: Use extended paths on Windows for > 256 length

Many Windows filesystem calls (but not all) have a MAX_PATH limitation
of 260 characters (drive letter, colon, backslash, 256 char path, null).
This is especially problematic for interacting with large highly nested
build trees (the boost C++ libraries, for example). This limitation can
be overcome by using extended length paths instead.  By converting
local filesystem and network paths to extended length paths before
passing them to the underlying APIs the maximum path length can be as
large as 32767 characters. The new ConvertToWindowsExtendedPath
function will convert "E:/a.txt" to "\\?\E:\a.txt" and "\\Foo\a.txt" to
"\\?\UNC\Foo\a.txt".

This also adds a hidden CMake option, KWSYS_TEST_SYSTEMTOOLS_LONG_PATHS,
which, when set to TRUE, will enable the extended length path tests.
This is off by default since if something does go awry, the resulting
leftovers could be difficult to delete manually.

Change-Id: Ib7ac1f657241ed389169678d1c078c0d836f1c7b