Added Application Mode.

When the program running in the terminal application sends the sequence ESC
& <cookie> 0x07 (where cookie is a string defined by the application), the
terminal enters application mode.  Further input from the program is sent to
the application via the events, 'application-mode-start',
'application-mode-data' and 'application-mode-end'.  The program can exit
appliation mode by sending a NUL char.
Added a couple methods for applications to use for adding DOM elements at
the bottom of the terminal, and for moving rendered rows into the
scrollback area.
Added setCursorBlink() method for turning cursor blink on or off at run time.
Fixed Shift+PageUp and Shift+PageDown when physical scrolling is being used.
Make sure that the top of terminal aligns with the top of containing element
when using physical scrolling and when completely scrolled down to the end,
otherwise it can look crappy.