When dep-scanning, canonicalize the module map path as much as we can. This avoids unnecessarily needing to build multiple versions of a module due to symlinks or case-insensitive file paths.
Despite the name tryGetRealPathName, the previous implementation did not actually return the realpath most of the time, and indeed it would be incorrect to do so since the realpath could be outside the module directory, which would have broken finding headers relative to the module.
Instead, use a canonicalization that is specific to the needs of modulemap files (canonicalize the directory separately from the filename).
Is that because the parser is looking for headers in ../Headers and ../PrivateHeaders? If so, would it make sense to make the parser smarter and canonicalize even framework paths here?