SQL Compiler/Generator speed improvement

There were 7 places where the ItemExprTreeAsList::entries() routine
was being called inside a for loop when the return value from entries()
did not change while going through the loop.  For most xyz::entries()
routines, that is not significant since they just return the value
previously stored in an object.  However, ItemExprTreeAsList::entries()
actually traverses a node tree and counts the number of nodes.
This set of changes moves the call to that routine outside the loop.

All dev regressions were run to ensure that the fix has no
side-effects.

Files changed:
sql/generator/GenRelMisc.cpp
sql/optimizer/BindRelExpr.cpp
sql/optimizer/OptLogRelExpr.cpp
sql/parser/SqlParserAux.cpp

Change-Id: Ia5c9200805b839c0c6328e410a27d786e6136ba1
Merge "SQL Compiler/Generator speed improvement"