Clean up Compile API (#24436)
### Description
Address additional review comments on
https://github.com/microsoft/onnxruntime/pull/24207:
- Remove use of `#ifdef ORT_MINIMAL_BUILD` in public C/C++ API headers
for Compile API
- Use `AllocatorPtr` internally to ensure memory is properly released if
an exception is thrown while serializing the output model to the user's
buffer.
- Improve C API function documentation.
- Clean up internal `ModelCompilationOptions` class
### Motivation and Context
Useful review comments were left on the original PR after merge. This
addresses those comments.