insights: reorganize creating of series resolvers
Created by: chwarwick
A first pass at making changes to how the resolvers for a data series are generated to make it easier to add new logic supporting moving non-capture group just in time series to the backend logic.
No functionality changes.
Primary goals:
- Extract capabilities from existing code that could be reused when adding the non-capture group just in time functionality.
- Simplify the logic in DataSeries that creates the DataSeries resolvers by creating a chain of responsibility.
related to https://github.com/sourcegraph/sourcegraph/issues/25062
This isn't necessary to accomplish supporting the just in time insights on the backend but I found that once I started adding it some of the logic was harder to follow.
see notes below
Test plan
No functionality changes. All existing tests pass.