Introduce groupBy' and fix #53

`groupBy'` performs grouping the way it turned out to be expected by many from `groupBy` in the discussion of issue #53. This pull request also rebases the implementation of `groupWith` on `groupBy'`, thus fixing the aforementioned issue.