Added test case to check compiler with plans branching directly after a loop.
Implemented ordering within groups in optimizer.
Added tests.
Cleaned up property matching/reasoning for dual input operators.