Expose the internal query structure, start using it.
Note: This is the most minimal change possible i could create. I have
trivial followups, like fixing the one use of const FastMathFlags &,
the renaming of CtxI to be consistent, etc.
This should be NFC.
I considered docs, but i'm not even sure what i'd say here.
They are straightforward enough that we never documented them before.