Fix Markdown formatting

Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
Rename addmessageheader()'s crlf parameter to linebreak

The parameter's value is a string representing the linebreak,
and can sometimes contain just '\n', in which case naming it
crlf is slightly misleading.

Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
addmessageheader: fix case #2 and flesh out docstring

The example illustrations were slightly cryptic;
modify them to be more obvious.

Fix case #2 (message starts with two line breaks)
where additional line break was shown and coded.

Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
addmessageheader(): add debug for header insertion

Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
Match header names case-insensitively

http://tools.ietf.org/html/rfc5234#section-2.3 says that ABNF strings
are case-insensitive.

Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
IMAP: provide message-id in error messages

This is handy for debug purposes when one tries to locate exact
message that was e.g. rejected by server.

Feature-request: http://comments.gmane.org/gmane.mail.imap.offlineimap.general/6491
Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
Merge branch 'next'