Add a setting to configure rejoin on reconnect behaviour
256 colour support for Irssi

This patch implements some 256 colour support for Irssi up from the
previous 16 colours. Initial parsing of the %x/%X format codes is
implemented and the parser accounts in advances the char* for
that.

The colour attributes are widened from 4 to 8 bit. The colour protocol
is changed to a new format. Some pointers to remaining work are
written in the comment in textbuffer.h.

Note that Irssi already does support requesting 256 colours from the
terminal in the original source code, so this part did not have to be
touched.

Finish 256 colour support for Irssi

256 colour patch is cleaned up and the remaining cases are made work,
this includes especially Theme support, which was not implemented
before. Changes not related to colours were reverted again, making a
review of the two patches against master easier to follow.

As a byproduct of the Hex-colour code parser, the 24bit colours are
also implemented. Actually using them in the terminal is guarded by a
compile time switch (as well as a run time switch), as it breaks the
existing colour protocol and requires additional storage.

To make a seamless usage, down-conversion is provided for 8 and 16
colours.

Diverging from Tom's approach, the colour protocol is reverted back to
the original one. Unfortunately, the changes required in the Theme
engine will break the API.

For more details, please refer to the patch documentation at either
http://irssi-docs.wikispaces.com/Notes-256-Colour or
https://github.com/shabble/irssi-docs/wiki/Notes-256-Colour
add italics support; don't use standout for reverse

optionally render /foo/ as italics
Properly split long IRC messages

This commit adds handling of long IRC messages to the core. In contrast
to the `splitlong.pl' plugin, multi-byte encoded and recoded messages
are properly split.

To allow for this, a new function has been added to the server struct:
`split_message'. `split_message' returns a string array with the message
splitted to substrings of a length that the server can handle. If a
protocol module doesn't have any limit, it can simply return a singleton
array with a copy of the message.

The `MSG' chat command now calls `split_message' before `send_message',
and emits `message own_public' / `message own_private' with each
substring, so that the string splitting will be visible in the UI.

`split_message' in the IRC module uses `recode_split' which in turn uses
iconv to properly split multi-byte encoded (and recoded) messages.
Add configurable split line prefixes and suffixes

Add settings `split_line_start' and `split_line_end' analogous to
`splitlong_line_start' and `splitlong_line_end' in `splitlong.pl'. The
prefixes and suffixes are concatenated with a wrapper function to keep
`recode_split' and `strsplit_len' simple.
Avoid unnecessary splitting of lines

`split_line_end' could force lines to be unnecessarily split. This
commit fixes the problem by making sure that the last line isn't shorter
than `split_line_end'.
Fix the `userhostlen' fallback in `split_message'

ferret, the author of `splitlong-safe.pl' pointed out that `userhostlen'
should not only contain the maximum length of the hostname, but also the
maximum length of the username. Now 10 is used as the maximum username
length as a fallback. (`splitlong-safe.pl' uses the same limit.)

The username limit isn't defined in the standard, but 10 is common on
many networks. The odds that something goes wrong here is low, as
 1) the fallback limit is only used when the user has not yet joined a
    channel
 2) the maximum hostname length (63) gives some error margin as the
    hostname usually is shorter
Split long IRC `ACTION' messages

Add line splitting logic to commands `/me' and `/action'.
Move the definition of the `split_line' settings
Introduce a MAX_USERHOST_LEN constant for IRC
Replace a `goto out' with explicit freeing
Replace an indent of eight spaces with a tab
Implement CAP Related Signals
barely fix make dist