Use "off" glyphicon instead of "remove"

Needs a few fixes to not look disproportionately large next to the cog.
Also remove that sodden trailing space.
Prevent triggering ng-focus on input during completion

$apply during another $apply is not possible, and .focus() on the input node
triggers the ng-focus on it (which hides the sidebar, if on mobile), so to
prevent the exception from being thrown, move the input node focusing
out of the $apply with a timeout of 0.
Merge pull request #421 from glowing-bear/double-apply

Prevent triggering ng-focus on input during completion
Merge pull request #419 from glowing-bear/glyphicon

Use "off" glyphicon instead of "remove"
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