[JIT] Mark aten::wait as having side effect, since it can represent RPC message received (#35695)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/35695
aten::wait was optimized out, causing RPC futures are not waited on.
Test Plan:
```
buck test mode/dev-nosan //caffe2/torch/fb/distributed/model_parallel/tests:test_dist_optim
```
```
buck test mode/dev-nosan //caffe2/test/distributed/rpc/jit:rpc_fork
buck build mode/dev-nosan //caffe2/test/distributed/rpc/jit:rpc_fork && \
buck-out/gen/caffe2/test/distributed/rpc/jit/rpc_fork\#binary.par \
-r test_python_future_with_jit
```
```
buck build mode/dev-nosan //caffe2/test:jit && \
buck-out/gen/caffe2/test/jit\#binary.par -r test_trace_fork_wait_inline
```
```
buck build mode/dev-nosan //caffe2/test:jit && \
buck-out/gen/caffe2/test/jit\#binary.par -r test_trace_fork_wait_inline_onnx
```
Differential Revision: D9562716
fbshipit-source-id: 35b2c971efa42949ffdf0910bd75a927eee8d965