[Github] Make prune unused branches workflow correctly handle reverts (#183114)
Revert branches were not being correctly excluded from the list of
branches to delete as we never even looked for them. Look for them, and
add some comments to explain.
I have verified that after this patch, the workflow only deletes
branches that are not associated with any PR.