Add ModelProto support for quantize api (#20018)
### Description
Add ModelProto support for `quantize` api
### Motivation and Context
Currently, the `quantize` API only accepts a model path as the input
model. However, for large models, saving and loading from disk can be
time-consuming. By adding `ModelProto` as an input option to the
`quantize` API, significant time can be saved.