Adding StreamWrapper to ensure file object will be closed (#66715)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/66715
Adding StreamWrapper to streams produced by DataPipes within PyTorch Core and TorchData
Test Plan: OSS CI and Internal Tests
Reviewed By: ejguan
Differential Revision: D31695248
fbshipit-source-id: c26fa1bc1688d5597851ad265f667fafdcd64c59