This is a counter-proposal to the fix suggested in
https://reviews.llvm.org/D74488
VFS paths can be a hybrid of Windows and Posix styles, so the sys::path methods sometimes cannot handle them. This generalizes the VFS-specific canonicalize function to remove traversal components from these possibly hybrid paths.
THIS NEEDS TESTS.