[XC] Avoid NativeAOT trim warnings for compiled bindings
Contributes to #25406
Description of Change
The BindingExtension class has an attribute that tells XamlC to include the XamlTypeResovler in the service provider when calling the ProvideValue method:
https://github.com/dotnet/maui/blob/70f1f76cf67966e5e86a5caa7ddb30f7236a0269/src/Controls/src/Xaml/MarkupExtensions/BindingExtension.cs#L9-L10
The XamlTypeResovler is not trim and AOT compatible. Fortunately, it is NOT necessary when the binding is compiled. This PR adds a workaround that will prevent generating the faulty code in .NET 9. I think we should follow-up on this later in .NET 10 and properly compile the BindingExtension (see the referenced issue for more details).
/azp run
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.
Closing in favor of #25420