[JSEP] allow JsCustomAllocator to deal with zero sized input (#17660)
### Description
allow JsCustomAllocator to deal with zero sized input.
This is a standalone fix for zero-sized tensor handling for
JsCustomAllocator. There are other components in JSEP not supporting
zero-sized tensors need to be fixed.