Re-enable "fetch more lines" after trimming lines on buffer switch

Fixes #404
Merge pull request #442 from glowing-bear/fix-line-fetching-after-switch

Re-enable "fetch more lines" after trimming lines on buffer switch
Keep core buffer visible with 'only show unread'
Merge pull request #447 from glowing-bear/unread-only-show-core

Keep core buffer visible with 'only show unread'
support direct html colour specs in client messages
Add support for explicit fromnick in protocol messages where availiable

This can replace the prefix-nick-guessing where available.
Support host-rendered time

If available, display the time as rendered by the host instead of own
calculation
Correct setId placement

The setId had been implemented once on the protocol instance and once
as a (unused) static method.
ignore empty messages received on websockets, which may be used as pings
Add ID to lines

To support protocols with line removal, remember line IDs.
skip non-existant buffers when handling nicklist message, they may already have been closed
Add more nicklist update operations

Implement the changegroup and rename commands for the nicklist.
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
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
Implement challengeauth login mechanism

Some protocols only support login via challengeauth and not via
PLAIN. This adds support for this mechanism.
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.
speed up consecutive line inserts by remembering place in model
Prefer buffer sharing the textbuffer when buffers get closed

For protocols with shared textbuffers, select another buffer inside
the same textbuffer (if one exists) rather than the first buffer on
buffer close.