Make name an std::string in OrtMemoryInfo (#25960)
### Description
<!-- Describe your changes. -->
OrtMemoryInfo has a name which is pointer.
With the recent changes a user can pass an arbitrary name and then
deallocate the string
as the API does not require it. Make the name a `std::strng` to own it
and refactor.
### 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. -->
We will have a dangling pointer especially when it comes to other
languages.
The way it used to work in the past, is that the string would be
compared to an internal constant and that constant would be used then.