Wrote unit tests for html_template.

I rewrote the code for html_template so that format-html and handle-attr
is defined inside denest-html. I had to do this because I had trouble
compiling html_template for the unit tests. This also makes the
namespace less cluttered