[Fix] C++ API SetOutputShape for register custom op. (#21366)
### Description
Bug fix for the SetOutputShape method in custom op shape inference.
### Motivation and Context
- Bug a : A obvious bug that will cause all dimensions to be 1.
https://github.com/microsoft/onnxruntime/blob/main/include/onnxruntime/core/session/onnxruntime_cxx_inline.h#L2014
integer_dims.push_back(dim.IsInt()); ->
integer_dims.push_back(dim.AsInt());
- Bug b : vector out of range error
op's input maybe a scalar and shape is empty.
https://github.com/microsoft/onnxruntime/blob/main/include/onnxruntime/core/session/onnxruntime_cxx_inline.h#L1985
---------
Co-authored-by: mingyue <mingyue@amd.com>