[Pytorch][4/4 Static dispatch] Support multiple backends with multiple kernels (#76059)
Summary:
- Supports multiple backends with multiple kernels in static dispatch
- Refactor static dispatch generators
Pull Request resolved: https://github.com/pytorch/pytorch/pull/76059
ghstack-source-id: 154735166
Test Plan:
```
(pytorch) ~/fbsource
└─ $ buck build --config pt.enable_lightweight_dispatch=1 --config pt.static_dispatch_backend="CPU;QuantizedCPU;CompositeExplicitAutograd" //xplat/caffe2/fb/lite_predictor:lite_predictor_flatbuffer
```
Reviewed By: bdhirsh
Differential Revision: D35727473
fbshipit-source-id: 986ba3390c6e585fcf8477b6d069720ee1fbc90b
(cherry picked from commit 6473990c208a78879985e4cdfb50960f5727ad5e)