Clean up genStat and exprToStat.

In particular, the logic of the Assign cases was moved to
genExpr(), and merged in one case.