In order to support soft assertions in #26917 and #26969, we need common support for tracking multiple failures and generating a single AssertionError containing those failures as suppressed exceptions.