Added test for db:aggregate() average function
Added tests for db:aggregate() "max" and "min" calculation
Added the test for db:average() count
other minor changes
Added tests for all db:aggregate() functions
the second version checks if a query argument works
Bug fixes for db:aggregate() functions with query
Fixed the query argument for db:aggregate function