SERVER-137528Backlog
Conditionally pushdown $match past $group in $lookup
The pipeline optimiser applies $match pushdown in subpipelines before selecting the $lookup cache boundary. The $lookup cache (DocumentSourceSequentialDocumentCache) caches the longest initial prefix that meets its requirements: stages must support dependency tracking, must not reference variables defined in the lookup scope, and must not require randomness (with the $search and $vectorSearch exceptions to the dependency-tracking check). A correlated $match ends the cacheable prefix, but earlier