Add tests for the problematic cases.
Just stop if see IF on the stack.
merge MMcM: Don't promote outer joins on columns used in IfElse expressions

Merge pull request #1176 from MMcM/sql-layer/sql-outer-join-promotion-for-if-condition
https://github.com/FoundationDB/sql-layer/pull/1176