Fix memleakdbg call stack output. (#24542)
### Description
<!-- Describe your changes. -->
Fix memleakdbg call stack output.
The call stack output was getting clobbered:
`C:\dev\onnxruntime\build\Debug\_deps\googletest-src\googletest\include\gtest\internal\gtest-port.h(1631):
l\gtest-port.h(1631): eadLocal<testing::Sequence *>::GetOrCreateValue`
I think the issue is that this aliasing of `buffer` and `symbol`:
https://github.com/microsoft/onnxruntime/blob/173a11a4e7a2f7a360c9db6abbe601a06a16f004/onnxruntime/core/platform/windows/debug_alloc.cc#L97-L100
does not play nicely with a call to `_snprintf_s` like this:
https://github.com/microsoft/onnxruntime/blob/173a11a4e7a2f7a360c9db6abbe601a06a16f004/onnxruntime/core/platform/windows/debug_alloc.cc#L115
The clobbered output does not match the predefined, ignored patterns, so
we see spurious mem leak check output.
This change updates the memleakdbg output generation to use C++ ostreams
and instead of fixed size buffers and `_snprintf_s`.
### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
Fix spurious mem leak check output.
Fix #24535.