cmDyndepCollation: factor out writing C++ module info from Ninja
To facilitate other generators being able to build C++20 modules, start pulling out collator logic into a generator-agnostic location.
This commit starts by factoring out the information written to the "target depend info" object consumed during the build to handle writing out export and installation scripts expected during those steps.