[Optimizer] Fix exception for Q -> DQ sequence with different scale types (#23771)
### Description
Fixes bug in the IsQDQPairSupported utility function, which is used by
various QDQ optimizers (e.g., DoubleQDQPairsRemover, QDQFinalCleanup,
etc.). The bug causes an exception when IsQDQPairIsSupported() is called
with a `Q(scale_f32) -> DQ(scale_f16)` sequence that uses different
scale types.
### Motivation and Context
Fix bug that prevents creating QDQ models that use scales of different
types.