Simplified and HTML lowered statement dumps

Initial import, adaptation, and cleanup of statement simplification, HTML dump. Original code by @zingales. This needs a review.
Why do we need so many overloads here? There's clearly precedent for overloading compile_to_xxx() methods in this class but this seems a bit heavyweight and the purposes aren't entirely clear to me; at a minimum, doc comments explaining the arguments are necessary.