add close() method to tqdm mock (#46040)
Summary:
In `torchvision` we use [`torch.hub.tqdm`](https://github.com/pytorch/vision/blob/2cc20d7485458a6368e8995e3f79799589b632bd/torchvision/datasets/utils.py#L11) to display the dataset download. One of our methods uses [`tqdm().close()`](https://github.com/pytorch/vision/blob/2cc20d7485458a6368e8995e3f79799589b632bd/torchvision/datasets/utils.py#L188), which is [not included in the mock](https://github.com/pmeier/pytorch/blob/283ae1998cd6920b588907adfb88909afb522ae2/torch/hub.py#L22-L49). This PR adds a `close()` method to the mock.
Cc fmassa
Pull Request resolved: https://github.com/pytorch/pytorch/pull/46040
Reviewed By: mrshenli
Differential Revision: D25619429
Pulled By: fmassa
fbshipit-source-id: a137f2417d8a47923ccb1ec6b7d5298c1545245c