Change RID fallback to happen per asset type (dotnet/core-setup#6724)
Previously the hostpolicy would find the best RID match across all assets in a given package. Once it found one, it removed all assets not matching the found RID.
This means that if there's a managed assembly for RID `win` and native library for RID `win-x86`, only the native library would be resolved, the managed assembly would never be used (since it doesn't match exactly the more specific `win-x86` RID).
This is not what NuGet does, NuGet performs the RID fallback per asset type, so native libraries are processed separately from managed assemblies.
This change modifies hostpolicy to match the NuGet behavior. Had to change the data structures which stored package->rid->asset-type. Now it's package->asset-type->rid.
Added test for this case.
Commit migrated from https://github.com/dotnet/core-setup/commit/
3f133f51bc6fd73c7b150dcdd9195a2530a4d3b1