Simplified and HTML lowered statement dumps

Initial import, adaptation, and cleanup of statement simplification, HTML dump. Original code by @zingales. This needs a review.
More serious nit: I don't understand the comment, because Stmts are immutable, so you should absolutely use f.lowered if that's the stmt you want.