[JIT] Replace uses of "whitelist" in jit/_script.py (#41458)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/41458
**Test Plan**
Continuous integration.
**Fixes**
This commit partially fixes #41443.
Test Plan: Imported from OSS
Reviewed By: suo
Differential Revision: D22544273
Pulled By: SplitInfinity
fbshipit-source-id: 8148e5338f90a5ef19177cf68bf36b56926d5a6c