optimizer_tests: actually verify optimized plan

@stechu is this test exposing a bug in multiway joins? I think this
double-join should be merged into 1.

In any case, we should actually be verifying the core operators, not
just the number of cross products here.
optimizer_tests: refactor logical_to_physical

eliminate code reuse as I requested