A couple of tweaks to reporting output.

1. Handle ansi escape sequences better. Previously we would render

  \033[36m bar \033[1m baz \033[0m

   as

   <span class="ansi-36"> bar </span><span class="ansi-1"> baz </span>

   Now we correctly nest it as

   <span class="ansi-36"> bar <span class="ansi-1"> baz </span></span>

   This is important because, e.g., \033[1m means "bold text", so we
   need to keep whatever color we had.

2. Make sure unindented console output starts on a new line