initial working version
groupBy improvements
add copyright
minor refactoring
Merge pull request #393 from metamx/group-by-improvements

Group by memory usage improvements