Bug fix for approximate AVG and SUM error bounds

* Fix AVG error bound, so that we divide by the unweighted number of samples, instead of the weighted number.
* Fix SUM error bound, to include missing samples term, and to compute the variance of the unweighted data
* Include derivation of error bounds in comments
* Improve unit tests for approximate aggregations:
** Check that error bound is neither too tight nor too loose
** Test on random number of samples, instead of always testing on a fixed size
** Increase amount of data used in testing