Improve codegen by not making useless do blocks

* src/pf/codegen2.lua: Avoid creating do blocks in the consequent of
  "if" and in the root expression in procedures.
Better "do" simplification

* src/pf/codegen2.lua (simplify_do): Rename from "reduce".  Add ability
  to incrementally lift elements out of a "do".