cmGeneratorTarget: add method to get a filesystem-safe export name

C++ module support puts the export name in a filename. Export names with
`:` in them are not valid filenames on Windows. Add a method to escape
names as necessary.

See: #25828
2 files changed