Do not run AOT function inlining when the model does not define any local functions (#18302)
### Description
Check if the model defines any local functions.
if not, skip AOT inlining including any schema based functions.
The latter would be inlined during partitioning.
### Motivation and Context
This prevents calls GetCapability() to EPs and enhahces compatibility.
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
---------
Co-authored-by: Pranav Sharma <prs@microsoft.com>