Refactor term.js using a different js-object pattern this time.

The goal is to being able to embed a complete terminal inside an iframe.
Completely get rid of the Lines and App elements, keep only the Lines
methods. Move all global functions into the SchirmTerminal object; let the
SchirmTerminal create the markup for the terminal screen; some cleanup.
Sketch a possible API and usage of an embedded term.
Untangle the relationships between logical modules in the emulator.

The terminal emulation works again. Iframes do not.

Refactorings:

- separate the terminal process spawning and io (-> terminalio) from the
  terminal emulation controller (term.Terminal)
- create a controller for iframe related functionality and state
  (-> termiframe)
- move keymapping into a separate module
- aim for being able to drive the terminal emulation classes using any
  terminal io stream and any html ui (-> embedded terminals, schirm
  terminal in a browser)

Implement optimizations:

- use dedicated line-modify events instead of scanning through all visible
  lines for changes
- only use the last set_screen event from each render-event-batch

Fixes:

- do not set the cursor in termscreen on erase-in-display, cursor handing
  and state is done in term.Terminal
Focus the webview when opening the terminal window.
Enable iframe mode.

Fixed bugs from the former refactoring so that basic iframe functionality
is restored again.

Fix logging to use per-module python logging Loggers as suggested in the
logging documentation. Make an exception for the webview console log. The
console log gets its own logger, as those messages as they are likely used
to debug schirm applications.
Enable iframe resizing and request/response mechanics.

Remove the schirmlog feature to 'send' strings to the terminal process via
console.log. Use asynchronous http requests instead. Fix the schirmclient
request header parsing.
Add websocket support to webserver using ws4py.

Seems like the proxy settings are not picked up by webkitgtk for websocket
urls. No is proxy required for simple schirm<->(term)iframe communications.
Currently presents a security hole for rogue scripts and limits the
use of websockets in schirm terminal applications.
Use websockets to communicate with term.js.

This is visually slower than using console.log and webkit.execute but
allows to use plain chromium with the schirm webserver acting as a proxy.
Schirm can then be distributed in a 'light' version: without all the gtk
dependencies and without the c module to set the pywebkitgtk's proxy.
Do not garbage collect websocket requests.
Enqueue ui messages until the websocket connection has been established.
Move websocket and terminal html UI setup into schirm.Schirm.

Don't start the terminal emulation and don't read from the pty until the
html UI <-> schirm websocket has been established.
Enable iframe -> emulator communication and make iframe resizing work.
Implement frame <-> terminal process communication (schirm.send).

Uses websockets and .send/.onmessage in JS and the existing escape-code-API
around messages/requests.
Finalize the iframe messaging implementation.

Replace the old iframe-mode 'execute' and 'eval' commands with the 'send'
command.

Add a cli flag to enable javascript-inspecting iframes from within the
webkit inspector by fetching the frames root document from the same domain
as the main terminal frame.
Fix old requests gc again.
Enqueue iframe-mode websocket messages until onmessage is set.

It would have probably been easier to just expose the websocket (and so its
.onmessage property) directly, but I'd really like to keep the schirm API
clean and terse (and provide only .send and .onmessage without leaking
the websocket object).