If multiple /manifestdependency: flags are passed, they are
naively deduped, but after that each of them should have an
effect, instead of just the last one.
Also, /manifestdependency: flags are allowed in .drectve sections
(from #pragma comment(linker, ...). To make the interaction between
/manifestdependency: flags enabling manifest by default but
/manifest:no overriding this work, add an explict ManifestKind::Default
state to represent no explicit /manifest flag being passed.
To make /manifestdependency: flags from input file .drectve sections
work with /manifest:embed, delay embedded manifest emission until
after input files have been read.
This in turn requires undoing D38975: The .res file is now created only
sometimes, and only after the repro response file has been created.
Moving the response file creation is tricky (see review for details), so
move back to having the manifest inputs in the repro file instead. Now
that we don't rely on cvt.exe, that's less bad than it used to be.
I worry that MSVC may do more things to deduplicate manifest files. They could canonicalize the path first and ignore case, for example. However, I really don't think it matters. The main thing is that repeated, identical directives should not add the same file twice, and this handles that well enough.