Support aggregation output as a cursor. PYTHON-542