Restore expansion of leading '~' as home directory in input paths

This was accidentally dropped by commit 622596c6b2 (cmSystemTools:
Re-implement ToNormalizedPathOnDisk without translation map, 2024-10-30,
v4.0.0-rc1~528^2~5).  Previously it was done by `CollapseFullPath`.
`cm::PathResolver` intentionally does not expand `~` because it makes
sense only for transforming input paths.  Teach `ToNormalizedPathOnDisk`
to handle it directly.

Fixes: #26827
4 files changed