added support for windowchange events

Added 'windowchange' to list of events to emit - message includes new values for ptyWidth and ptyHeight. Updated term.js example to use it.