Put asserts in a block, pulled Lets out into LetStmts.

A bit of improvement to the HTML output:

- Contiguous asserts get moved into a collapsible block.
- Lets are moved into LetStmts. 

These transformations are not returned, the IR transformations are only used for HTML output.