[PT2][Quant][BE] refactor tets cose to reduce duplication and standardize (#102497)
Summary:
This refactor introduces an internal function which selectively tests againt fx
quant as well. Notably this does increase test times so wo need to figure out
how to resolve that.
Test Plan: test_quantization_pt2e
Reviewed By: jerryzh168
Differential Revision: D46154323
Pull Request resolved: https://github.com/pytorch/pytorch/pull/102497
Approved by: https://github.com/jerryzh168