Client-side reports comparison ignores multiple reports
## Problem
Some CI reports that are shown in the MR widget use client-side comparison (in the frontend) to determine what changed between the `base` report and the `head` report. The problem is that the download path exposed for both `base` and `head` reports points to a single artifact and does not consider the scenario where multiple reports of the given type are present in the pipeline.
Lets say I have a pipeline with 2 quality test jobs `quality-frontend` and `quality-backend`. The download path for either `base` or `head` returns the latest artifact by ID for the given type. In this case it could be either `quality-frontend` or `quality-backend`.
The problem is not only limited to code quality reports. At least [`browser_performance`](https://gitlab.com/gitlab-org/gitlab/-/blob/916d384432cba913d3c05ee8a0034ba4c3cc6e7c/ee/app/serializers/ee/merge_request_widget_entity.rb#L9) and `load_performance` are affected too. Maybe more.
## Expectation
Both `base` and `head` reports should return a combined version of all the reports of the same type. A pipeline can have many reports of the same type and we should fulfill this requirement.
Another option could be to do the comparison in the backend (like it's currently being done for code quality reports) and expose only a single path for frontend to display.
## Details
We [expose downloadable paths for each report type for a MR](https://gitlab.com/gitlab-org/gitlab/blob/master/ee/app/serializers/ee/merge_request_widget_entity.rb#L16). The [`downloadable_path_for_report_type`](https://gitlab.com/gitlab-org/gitlab/-/blob/7eee28b892e3bee913b57189bf21816dce80b4db/app/presenters/ci/pipeline_presenter.rb#L115) method uses [`Ci::Pipeline#batch_lookup_report_artifact_for_file_type`](https://gitlab.com/gitlab-org/gitlab/-/blob/7eee28b892e3bee913b57189bf21816dce80b4db/app/models/ci/pipeline.rb#L632) which returns "the most recent artifact of a given type" in the pipeline.
This seems to be built under the assumption that a pipeline can only have 1 report of the given type. While this is true for a job, a pipeline could have multiple reports of the same type.
Why are we returning only the most recent one?
## Example
Lets say I have a pipeline with 2 quality test jobs `quality-frontend` and `quality-backend`. Each job generates its own `codeclimate` report. [When exposing the codeclimate report in the MR](https://gitlab.com/gitlab-org/gitlab/-/blob/e35cc79ac851d783ed402f74a670ade25243a7fe/app/serializers/merge_request_widget_entity.rb#L120) we would only return the download path to 1 of them (whatever has the highest ID). This doesn’t seem deterministic, or perhaps I’m not seeing the full picture here. (edited).
<!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION -->
*This page may contain information related to upcoming products, features and functionality.
It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes.
Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.*
<!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION -->
epic