FindXerces: Synchronise with upstream next branch

This has been merged into the cmake upstream next branch for testing.  No functional changes, just minor cleanup.  If the build and tests pass, it's ready to move onto their master branch.

Also includes minor portability fix for git, as for FindXerces primarily to improve the Windows build, since this can discover the installed versions of git without it being on the default path.

--no-rebase

--------

Testing:

jobs should remain green