Add `get_qparams` and revert the changes to `calculate_qparams` (#30262)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/30262
`get_qparams` returns all parameters that's needed to call quantize function
Test Plan:
python test/test_jit.py
Imported from OSS
Differential Revision: D18645047
fbshipit-source-id: e57c11a66dac2d589778d412a996796ad5b6f86a