Fix GroupByKey not working when KeySelector returns floats: MAGN-4348

@aparajit-pratap
@ke-yu (wrote the original implementation)

The problem with the original implementation is that the key->value mapping were stored in a DS Dictionary. When the keys were floating points numbers, the mapping would get confused and drop data. I have re-implemented `GroupByKey` to dispatch to a C# helper function, similar to how our sorting functions are implemented.
This is cleverly written concise code, a little hard to decode for me, but I sort of get the picture; just not sure what are the memory and performance implications of this as opposed to doing some operations on individual items in a traditional for/foreach loop.