fx quant: clean up functions in _prepare (#48773)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/48773
Makes util functions in `_prepare` have no side effects,
all dependencies are now in arguments.
Note: arg names are added in order as they appeared in function
code. It's not the most readable, but the lowest risk. This can
be cleaned up in future PRs if needed.
```
python test/test_quantization.py TestQuantizeFx
```
Test Plan: Imported from OSS
Reviewed By: jerryzh168
Differential Revision: D25295839
fbshipit-source-id: 60c687f6b64924473f969541c8703118e4f7d16e