Save Main ToolBar state when not built against KDE. Fixes #1116
Change ifdefs around Main ToolBar fix to target mac only.
Update AboutDlg
Handle the readyRead() signal in RemotePeer instead of LegacyPeer

That way, the RemotePeer subclasses don't all need to connect to the
signal themselves; also, we can make sure in a central place that
socket data is processed even the socket was handed over to the peer
with unhandled data still in its buffer.

Instead of handling the signal directly, RemotePeer subclasses need
to implement the onSocketDataAvailable() method.
Let RemotePeer(s) tell their protocol type and features

Knowing a peer's supported procotol type will come in handy once we
support more than one protocol. Also, peers may support specific
features which they can now report via the new accessor.
Add PeerFactory

This factory creates an instance of a RemotePeer subclass based on the
given protocol type and peer-specific features. If given a list, it will
select the preferred one (generally the first one that matches an available
peer which accepts the given peer-specific features).

For now, we just have the LegacyPeer (which does not have specific
features, so that value is ignored).
Allow overriding of socket handling methods

This is primarily needed for ClientAuthHandler, which does not want
to throw error messages to the outside during protocol detection.
Implement protocol detection

This introduces a new initial handshake for negotiating the supported
protocols and connection features on both sides. It is completely
backwards compatible with older releases, in which case we go into
fallback mode.

Arguably, we could've used a nice, verbose, text-based handshake, but
that would've introduced questions around string formats, parsing and so
on. Also I felt like doing some bitbanging, so now the probing only
exchanges a few bytes which are described in the wiki [1]. If we ever
plan to use a more verbose or different format, changing the magic that
starts the whole shebang will be sufficient to indicate a new format.

Immediately after probing, if both core and client support the new format
(and a protocol other than the legacy one),we'll enable SSL and compression [2]
as appropriate, instead of doing it somewhat later in the middle of the legacy
handshake.

To retain compatibility, the magic number sent by the client is designed such
that older cores will immediately close the connection; we'll then reconnect
in compatibility mode. The other way round, if an older client connects to
a new core, we'll figure out that there's no magic being sent and switch to
legacy mode as well.

The unchanged legacy protocol is also the last resort even if both ends speak
the new handshake as long as we don't have an alternative to offer. So for now,
we'll probe for protocol support, get back the legacy protocol as only choice,
and use that as before. This also disables early SSL and compression mentioned above.

This means that 3rd party clients could already implement the handshake in
preparation for the future without changing anything else. Note that they should
also implement the detection of older cores in order to stay compatible with them -
simply detect a disconnect after the first few bytes sent and reconnect again
in compat mode.

[1] http://bugs.quassel-irc.org/projects/quassel-irc/wiki/Doc_quassel_protocols
[2] Not implemented yet.
More typedef, less typing
Have the PeerFactory provide the list of supported protocols

... and make use of that in ClientAuthHandler, instead of hardcoding
the available protocols there.
Use PeerFactory instead of creating LegacyPeer directly

This means that legacypeer.h needs be included by peerfactory.cpp only,
and we can remove all references to it elsewhere.
Use milliseconds for CTCP PING
Make CTCP PING report the correct millisecond round-trip time

If we want to display latency in milliseconds, we should also make sure
our payload is set in milliseconds.

Unfortunately, millisecond resolution for QDateTime appeared only in
Qt 4.7, so it'll stay in seconds for cores built against older Qt versions.
There won't ever be a Qt 4.9...

... and this should actually have been a check for Qt 4.7+.
Merge branch 'master' of https://github.com/quassel/quassel