Initial implementation of query op "groupby"

@tea-dragon and I pair programmed this feature. By which I mean Ian told me what to do. Please look over and see if it is ok.