Quit early if a package is not topologically sorted, so if we later get a missing-inputs status we know that it is caused by an orphan tx or a tx trying to spend non-existing coins.
This concludes backport of [[https://github.com/bitcoin/bitcoin/pull/20833 | core#20833]]
https://github.com/bitcoin/bitcoin/pull/20833/commits/13650fe2e527bf0cf5d977bf5f3f1563b853ecdc
Note: this commit triggered a `m_sig_checks_standard’ may be used uninitialized` warning. As far as i can tell, this is a false positive. Nothing really changed in the way this atttribute is accessed after this change. To silence the warning, I initialized the attribute in the struct to 0. Otherwise, it would be initialized to 0 in `PreChecks -> CheckInputScripts > IsKeyInScriptCache > ScriptCacheElement(key, 0)`

Depends on D12126