Choose a version of `groupby` that is easier to understand.

This is `groupby_alt` from the original commit comment in this branch.
See discussion at #179.  This version performs very well as groups become
larger.  The previous implementation performs well when 10% or more of
the elements form groups of length one.

We plan to have various implementations in `benchmarkz` repository, which
will let contributors add benchmarks that they care about and easily run
them on all variants of `groupby`.