Add -group option and group() function to do what accumulate() did
before. Remove -command option. Remove dead code. Fix termination by
closing channels.