Short circuit complex case evaluation modes as soon as possible (#17898)
## Which issue does this PR close?
Improvement in the context of #18075
## Rationale for this change
Speculative performance improvements for case evaluation
## What changes are included in this PR?
Short circuit case evaluation loop when as soon as a value has been
calculated for each input rows
## Are these changes tested?
(Hopefully) covered by SQL logic tests
## Are there any user-facing changes?
No
---------
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>