Update groupby to allow grouping Ranges

Not really that useful, but it makes the original perf test actually work.