fx quant: fix bug in custom module test (#85344)
Summary:
`TestQuantizeFx.test_custom_module_class` was subtly broken because the
various parts of the test case were modifying the original model. This
seems incorrect because `prepare_fx` and `convert_fx` are inplace.
To fix this, we can `copy.deepcopy` the model before applying the
test cases to it.
This test case was triggered by an unrelated refactor, splitting the
fix in a separate diff to keep the refator clean.
Test plan:
```
python test/test_quantization.py TestQuantizeFx.test_custom_module_class
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/85344
Approved by: https://github.com/dzdang, https://github.com/z-a-f, https://github.com/jerryzh168