Get html_lines working. Get first end-to-end test of build_lines working.
Make TagWriters emit unicode, to go with the rest of the output source code.
Simplify tag_boundaries.

There's no need to chain all that stuff together, keeping regions and refs contiguous; we're going to sort it afterward anyway.
Add an explicit sort order for keeping Lines outermost and Refs next outermost.