AutoGen: Use moc-generated depfiles
AutoGen: Use moc-generated depfiles to determine the correct dependencies.
This fixes the following two bugs:
Fixes: #17750 (closed)
Fixes: #19058 (closed)
And speeds up incremental builds with ninja:
Fixes: #18749 (closed)