Adds groupBy

This should close #53

@robb please review :-)
This should `id<NSCopying>` with no space between the type and protocol