(#22191) Add cancelled resource handler

This commit adds the ability to pass a cancelled resource handler callback
to the traverse method such that if the traversal is cancelled, then the
callback is invoked once for each resource that is ready, but not yet
evaluated.

In addition, the resource is "finished", which unblocks its dependents, so
that the callback can handle those as well.

While writing tests for this, we found a bug in the main while loop.
Previously, the loop was removing the next ready resource, and then checking
if the loop had been cancelled. But if the loop was ever cancelled, the removed
resource was effectively lost. This commit reverses the order so that we only
remove the next ready resource if we intend to evaluate it.

Paired-with: Patrick Carlisle <patrick@puppetlabs.com>
(#22191) Mark ready, but unevaluated resources, as skipped

Previously, if a transaction was cancelled while processing resources, the
report did not contain any information about the skipped resources.

This commit modifies the transaction to supply a cancelled_resource_handler
callback, which if invoked, will generate a resource status object for the
resource, and mark the status as skipped.

This commit also updates the test helper to clear the run_status global
state before each test.

Paired-with: Patrick Carlisle <patrick@puppetlabs.com>
Maint: Remove duplicate line

We were calling compile_to_ral twice unnecessarily, presumably a bad merge or
copy and paste.