chg: add fchdirx as a utility function
As part of the series to support long socket paths, we need to use fchdir and
check its result in several places. Make it a utility function.
Welcome to Mercurial for Windows!
---------------------------------
For configuration and usage directions, please read the ReadMe.html
file that comes with this package.
Also check the release notes at:
https://mercurial-scm.org/wiki/WhatsNew