Rewrite Section#toHtml to use StringBuilder

Does not create a lot of large strings that are then just
discarded.

Change-Id: I293cff04aa7653d0f14353d602af8fc13a161105