This change is a direct consequence of this discussion on the mailing list:
https://www.mercurial-scm.org/pipermail/mercurial-devel/2019-August/133574.html
The implementations of HgPath and HgPathBuf are, for the most part, taken
directly from OsStr and OsString respectively from the standard library.
What this change does *not* yet do is implement the Windows MBCS to WTF8
conversion, but it lays the basis for a very flexible interface for paths.
You should probably add a note about what a valid path is. My initial assumption is "A sequence of non-null characters. / separates directories, consecutive / are forbidden". It would be good to write this down, provide an is_valid function and add a debug_assert! on creation/modification to check that everything is as expected.