python: support By(t, t, t.reduction())

Previously we expected the grouper to be a projection.  Now we allow it to be
any rowfuncable

cc @talumbau