Change how agg fns handle empty record sets.

After this change the behavior should be equal to that of sqlite and
MySQL as discussed in issue #15.

Fixes #15