fx quant: move more functions to utils (#48908)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/48908
No logic change, improving readability
Test Plan:
CI
Imported from OSS
Reviewed By: jerryzh168
Differential Revision: D25363080
fbshipit-source-id: 1d73a875bd7abf671b544ebc835432fea5306dc3