Handle keypress events as well

keydown is not enough, because browsers. A (very very very) long
explanation that I read in part is at http://unixpapa.com/js/key.html

E.g. on my keyboard layout (neo2), I don't get a keydown event for alt+<,
which in QWERTY keys is alt + caps lock + u (or the key above shift next to
enter on the right side, which actually isn't present on QWERTY (not ' but to
the right of it - it's not there on a US layout, but it is # on QWERTZ). I do get
a keypress event though.
Fix history keybindings for keypress

because ASCII != keydown code in JS m(
Merge pull request #399 from glowing-bear/fix-keypress

Handle keypress events as well
Correct setId placement

The setId had been implemented once on the protocol instance and once
as a (unused) static method.
Make it easier to switch protocols

This commit introduces a new module to switch the protocol. It will
look at a protocol=xxx query parameter (like the debug mode) to do so
add challengeauth
show active protocol name on the front page banner
make the websocket mountpoint protocol dependent
add handling for protocols that support skipLines in line retrieval
ignore empty messages received on websockets, which may be used as pings
embedded content: check if scrollIntoViewIfNeeded vendor method is available
Add ID to lines

To support protocols with line removal, remember line IDs.
Refactor Buffer into separate Buffer and Textbuffer objects

Some protocols require merged textbuffers that are shared by multiple
buffers and cannot be separated (similar to WeeChat's "merged buffers"
feature, but in WeeChat, the textbuffers are still separable).

This commit introduces support by splitting the textbuffer off into
its own class. This adds a small layer of indirection for some
operations.
visually show non-selected buffers that share a textbuffer
add support for removing lines in the textbuffer
[teddy default] no coloured hilight
[teddy default] make teddy default protocol
[teddy default] load teddy javascript
[teddy default] do not enable glowing-bear timestamps