Implement AVG aggregate function. Fix some issues with null values and arithmetic operators (division in particular). Move some utility methods to linq4j.