Fix a regression in the way that the sum(), avg(), and total() aggregate functions handle infinities.
Fix a bug in the json_array_length() function that occurs when the argument comes directly from json_remove().
Fix the omit-unused-subquery-columns optimization so that it works correctly if the subquery is a compound where one arm is DISTINCT and the other is not.
Other minor fixes.