User defined aggregates

Review after #594 

@domoritz , you are probably the best reviewer if you have time. UserDefinedAggregator is essentially a fork of StatefulApply, except that the emitters only trigger at EOS and the emitters are not allowed to use the input tuples.
Wait, I lied. There is one more reason:

We can compute the count/min/max on a column whose values we can't sum (overflow).