Simplify Grouped/CoGrouped/CoGroupable types

Please add notes on how to clean this further.

My goal was to try to make the weird logical rules about sorting visible at the type level, but I could not see an elegant way of doing that, and since any exceptions around that (see the sys.errors in this code) happen at plan time before any data has been touched, I don't think it is super critical to change it.

This code has the virtue, I think, of being source compatible with prior code, but with somewhat cleaner types.

Update: I did implement the encoding of the sorting + cogrouping rules into the types. I think almost all source code should continue to compile, but there may be some minor cases that require changes. The goal is to exclude at compile time cases that are not supported. The match seems very close now.