imap: fixed buggy names in generated URLs

For some reason the ImapUser variable gets emptied every one mailbox that gets
parsed. This produces the generated URLs to be not consistent among them,
generating, for example, "imaps://host.com/FolderA" and then
"imaps://user@host.com/FolderB". I haven't find the root cause of the problem,
but this at least fixes the issue temporarely
  sidebar: added initial sorting support

The initial sorting support sorts the mailboxes by hierarchy/path. This is a
nice feature to have when a user, like me, uses mutt to check its imaps
accounts.

The sorting method is still fixed, but it could be extended using a new user
preference
Don't consider TopBuffy as someone special, sort it as all the rest
Signed-off-by: Rodrigo Javier Tobar Carrizo <rtobar@csrg.inf.utfsm.cl>
notmuch: add $record support

Signed-off-by: Karel Zak <kzak@redhat.com>
sidebar: cleanup code, remove unnecessary basename and strdups

 - the code does not modify the buffers with paths, so strdup() is
   unnecessary

 - it seems that strchr() is enough (rather than fragile basename)

 - don't waste time for vfolders where we explicitly use folder
   description rather than folder path.

 - clean up the code to make the lines shorter

Signed-off-by: Karel Zak <kzak@redhat.com>
Follow notmuch behavior if Message-ID header does not follow spec

Change-Id: I536b59560463c958fa40bc76df2878421f1bca48
Merge branch 'master' of https://github.com/rtobar/mutt-kz
sidebar: extend sidebar sort methods, add sort_sidebar=

 sort_sidebar=(desc|path|count|new|unsorted)

Signed-off-by: Karel Zak <kzak@redhat.com>
added support for text transforms of tag names visible with '%g' in the index and pager formats