builder: planner: Handle no format= in source case correctly.
builder: Flush debug info after printing it.
builder: Add a test of the planner.

This tries out many combinations of size/format and ensures
that the planner can deal with them.