Simplified and HTML lowered statement dumps

Initial import, adaptation, and cleanup of statement simplification, HTML dump. Original code by @zingales. This needs a review.
I agree with the enum approach. I first assumed there should be more methods, but the explosion of overloads is getting pretty crazy; the .html suffix was an expedient hack to plumb this all through which I assumed would get some push-back before the final version, so I am certainly not wedded to it (though it does have a certain simplicity).