merge: add _checkunknowndirs function for detecting path conflicts
Add a new function which, given a file name, finds the shortest path for which
there is a conflicting file or directory in the working directory.
Differential Revision: https://phab.mercurial-scm.org/D779