Align Cosmos query pipeline code with latest relational code
After some examination, most of the Cosmos query pipeline is in relatively decent shape - aligned more or less to the relational query pipeline; I did NRT annotating (#33584) and some cleanup/styling (#33637), but beyond that I think we should be good to go.
~The part that likely requires attention and a possible rewrite/alignment is the shaper generation; assigning to @ajcvickers and @maumar. Note that there will likely be some shaper work as well for new features, e.g. complex type mapping.~
Significant additional work has been done in #33998 - at this point we should probably track specific issues/problems as they come up.
Work on shaper generation definitely remains (e.g. NRT annotation), but we can track that via specific issues as well.