(#22191) When a transaction is cancelled, mark remaining resources as skipped

Previously, if puppet was asked to stop prior to completing the transaction(s), it would omit the remaining resources from the report, which gave the impression that it applied a partial catalog.

These commits modify the transaction to mark those resources as skipped. It also fixes a bug in the transaction loop that could cause a resource (and its dependents) to be "lost" (neither ready, overly deferred or cancelled).