Scroll to the bottom periodically instead of after updates.

Scroll to the bottom of the page every 100ms. This reduced CPU usage and
is fast enough so that there is no noticable difference.
Use one <code> element per line.

Instead of appending to one (often very large) code element, break up
the lines into their own <code> elements. This speeds up appending
because (for whatever reason) building many small elements is faster
than appending to one large one.
Support the carraige return control character.

When a carraige return (\r) character is encountered, clear the <code>
element for the current line. This sorta, kinda emulates what happens in
the terminal (although not really).
Emulate carriage return with a hack for thin's parser.