Merge branch 'master' of gh:apenwarr/afterquery

* 'master' of gh:apenwarr/afterquery:
  Add the avg() aggregate function.
  In tables, add URL formatting.
  Forgot some return types for some aggregate functions.
  Add count_nz (count nonzero) aggregation function.