Added an experimental attempt to rationally pick chunk sizes in aggregate when aggregating by attributes. This needs improvement.