Encode more statements as polynomials.

Also desugar some constructs in the parser into others
rather than duplicating logic in the AST.