Add/fix typing annotations to some functions (#39075)
Summary:
Add missing typing imports to some jit tests
Add typing annotations to `torch.testing._compare_scalars_internal` and `torch.testing._internal.assertTrue`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/39075
Differential Revision: D21882468
Pulled By: malfet
fbshipit-source-id: dd9858eb8e11a38411544cc64daf36fced807d76