[ASTERIXDB-3015][FUN] Fix avg() handling of first non-number