[WebNN] Improve the util function of creating WebNN constant MLOperand (#22935)
Merge the util functions to create or retrieve:
- A WebNN constant MLOperand filled with the specified value, data type,
and shape.
- A WebNN scalar constant MLOperand with the specified value and data
type.