Add more declarations for q3's master.
Add q3's global aggregation step.

This doesn't typecheck, due to some bug with how nested TLower's are
handled. This results in almost any scenario with records inside records
failing the typecheck.