fix test_jit.py so it can be run in parallel (#24311)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/24311
Now you can run tests with `pytest -n auto test/test_jit.py` to get
tests to run in parallel. On my devfair in opt mode, this takes < 30
seconds, which is a huge improvement.
The actual changes are places where we hard-coded certain things that
got changed due to how pytest-xdist distributes tests:
1. Warnings are filtered after they are tripped once, so
`test_trace_warn` shouldn't rely on warning counts.
2. various file/save things hardcoded paths inappropraitely
Test Plan: Imported from OSS
Differential Revision: D16801256
Pulled By: suo
fbshipit-source-id: 62a3543dd7448a7d23bdef532953d06e222552ee