Reland "ios: remove shared_application and support app extension build #44732" (flutter/engine#45351)
Relands https://github.com/flutter/engine/pull/44732 with fix.
The original PR returns nil when the assets is not reachable, in some cases, the assets are not loaded yet but will be loaded later, so we should return the asset URL regardless.
Also added a fallback to main bundle to match the previous implementation.
The original PR was failed in internal tests in b/297654739
Now with the fix, all tests passed: cl/561449914
fixes https://github.com/flutter/flutter/issues/124289
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style