[release/6.0] Don't regress SkipLocalsInit optimization on < 6.0 .NETCoreApp assets (#57868)
* Don't regress SkipLocalsInit optimization on net5.0 assets
netcoreapp3.1 and net5.0 assets which are part of the Microsoft.NETCore.App shared framework and ship inside a package need to keep the SkipLocalsInit optimization to avoid regressing perf. This would happen when referencing one of the 6.0 packages but consuming either the netcoreapp3.1 or net5.0 asset in it. The higher assembly version of the netcoreapp3.1/net5.0 asset would win over the same asset in the shared framework and without this fix, the SkipLocalsInit optimization would be lost.
Contributes to https://github.com/dotnet/runtime/issues/54964