Use FileStore in TorchScript for store registry (#50248)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/50248
make the FileStore path also use TorchScript when it's needed.
Test Plan: wait for sandcastle.
Reviewed By: zzzwen
Differential Revision: D25842651
fbshipit-source-id: dec941e895a33ffde42c877afcaf64b5aecbe098