ns for fx: refactor test cases (#54280)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/54280
Some easy refactors to reduce duplicate logic in test cases
for NS for FX. In particular, we start reusing a common model
within this file, and we split the fp16 test cases to be more
modular.
Test Plan:
```
python test/test_quantization.py TestFXGraphMatcher
python test/test_quantization.py TestFXNumericSuiteCoreAPIs
```
Imported from OSS
Reviewed By: hx89
Differential Revision: D27173373
fbshipit-source-id: cf3f21ee8b9b12dff89f1cd2d3ac1749f3f63fe6