Optimize constant sharing perf (#20143)
### Optimize constant sharing perf
by avoiding [renaming for the first name we detect a constant pattern.
Currently every time we start run ConstantSharing, for each initializer,
we find its pattern does not exist, then we create a new NodeArg with a
unique name. Then later if other initializer share the same pattern,
they will be replaced by the NodeArg.
The problem is: once there is no real constant sharing cases, we still
modify the graph for each initializer. This is not needed.
### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->