Experimental

Hi. This branch is a fairly significant refactoring of the module.

I needed to output some additional markup in the case of invalid fields and I couldn't see a clean way to do it with the existing version.

With this version, all altered tags go through the _output_tag method, so we have a centralized place to override it in subclasses. I know performance is a concern so I tried to be mindful of that. Even with the additional method calls this version appears to perform about the same (I think I improved performance in some other areas).

I also tried to simplify some of the logic by changing the way state is maintained for the various tags. See around line #296. We're storing the HTML::Parser data for each tag as we see it start, which lets us reference it from other tags. That gets rid of a bunch of state variables and makes it simpler to follow IMO.