Issue #3620647: Add the entity list resource base class with both query sources
MyrestEntityListResourceBase holds the whole listing - pagination, ordering, filtering, facets, the out-of-range redirect, cache metadata and the envelope. A subclass declares the card structure, the orderings, the filters and the breadcrumb trail, and all four default to the model, so a generated class over a filled-in model has an empty body.
Where the entities come from is not declared but read: a bundle whose facets convention names a Search API index is listed through that index, a bundle that names none is listed with an entity query.
Three answers differ from what the handwritten listings do, and each is what this module already documents:
- a page past the end redirects, the first page does not, so an empty listing is an answer rather than a redirect to the page the caller is already on;
- a redirect that has no listing page to name goes to the first page of the same listing rather than to an empty string;
- an ordering the endpoint does not offer is refused with a 400 rather than quietly served in a different order.
MyrestResourceList declared cache contexts for limit, page and sort while reading sort_field and sort_order as well, which cached a listing under one ordering and served it under another. Both are added there, so the eight handwritten listings are fixed with it.
Closes #3620647