Make sure the omit-noop-left-join optimization is not applied if columns
of the LEFT JOIN are used in the ORDER BY clause.  
Ticket [be84e357c035]
Fix another problem in stat4 sample selection.
Harden the STAT4 logic in where.c against OOM faults.
Conditionally exclude code from analyze.c that is not used by STAT3.
Fix out-of-order variable declaration.  Fix harmless compiler warning.