[webgpu][dawn API optimization] reduce number of calls to buffer APIs (#24315)
### Description
This PR is one of a series of changes for optimization of Dawn API
usage. See https://github.com/microsoft/onnxruntime/pull/24281
Reduce the calls to wgpuBufferAddRef and wgpuBufferRelease (part 1).