Although generating command lines and collecting file dependencies recently got faster, there are still benefits to be had from doing these lazily, on-demand.
This patch makes it so that the ModuleDepsGraph keeps the scanning instance alive. Instances of ModuleDeps can then use pointer to the ModuleDepCollector to compute the information lazily.