ns for fx: change weight extraction to direct mapping (#62038)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/62038
Updates the logic to extract weights from nodes to use a
direct mapping from type to weight extraction function.
This is needed for a future PR which will allow users to
specify custom weight extraction functions for user defined
types.
Test Plan:
```
python test/test_quantization.py TestFXNumericSuiteCoreAPIs
python test/test_quantization.py TestFXNumericSuiteCoreAPIsModels
```
Imported from OSS
Reviewed By: jerryzh168
Differential Revision: D29853627
fbshipit-source-id: 3ef90ef4bd7b28f6316c0af215a2bd3ff8a2aeca