Fix NullReferenceException in background thread emitting IL in DependencyInjection (#55340)
* Fix NullReferenceException in background thread emitting IL in DependencyInjection
When ILEmitResolverBuilder is getting created, it grabs the "Root" scope off of the ServiceProvider. However, the Root scope isn't set on ServiceProvider yet. So later when it tries to get used, it null refs. But this exception gets caught and eaten since it happens on a background thread.
The fix is to set Root before creating the ServiceProviderEngine.
* Add a debug assert that we shouldn't get exceptions from the background compilation thread