[webgpu EP] put GetMaxComponents and SumVector to one place. (#24122)
### Description
put `GetMaxComponents` and `SumVector` to one place.
fix a bug in `SumVector`:
```diff
- return "(" + x + ".x + " + x + ".y + " + x + ".w + " + x + ".z" + ")";
+ return "(" + x + ".x + " + x + ".y + " + x + ".z + " + x + ".w" + ")";
```