[BE] Fix bug in flaky test uploading
I noticed that the latest windows c10_dist_gloo flakiness did not get caught by flaky test bot. https://hud.pytorch.org/pytorch/pytorch/commit/238d01ec9044d66c021baefd26f765b265ef35a7 The issue was because c10_dist_gloo is a test file that spawns duplicates intentionally, and I had excluded those in my "duplicate flaky test rerun" calculation.
I've now updated the logic to handle when those intentional duplicated tests are flaky as well.
This PR also cleans up some past outdated logic.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74712
Approved by: https://github.com/malfet