Fix aggregates on Linux.

No arguments are ever passed to the final function so values was a void pointer
causing sqlite3_value_type to fail. This simply stopped trying to collect args.

Also changed the order of the function definitions to something that made more
sense.