Handle GitHub request failure when filter test config (#96145)
This is to make the script more resilient to GitHub network flakiness, i.e. https://github.com/pytorch/pytorch/actions/runs/4347281268/jobs/7594804454. When the script couldn't get the list of labels from the PR to do filtering, it should just continue normally and run everything by default.
I also refactor the code a bit to re-use the existing `download_json` function which support retries.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/96145
Approved by: https://github.com/clee2000, https://github.com/malfet