Synchronize remote modifications from a Maildir source to sup

It is now possible to use multiple clients to handle Maildirs (and
IMAP server if you use offlineimap).

It works by using files' ctime instead of mtime when polling so we can
detect if the mail's flags have changed. Maildir#poll now appends
"subdir/ids" in the added and deleted arrays at each loop instead of
recreating them. Arrays are then compared to each other allowing us to
see if a mail has been updated or moved (from "cur/" to "new/" for
instance, this is what offlineimap does when you mark a read mail as
unread on an IMAP server).

The index is then updated and the display is refreshed. When a mail is
deleted it is now *really* deleted from xapian. Before, only its
location was removed but the mail could still be visible in search
results although we could'nt load its content ("An error occurred
while loading this message").

Beware that sup does NOT synchronize its modifications to the source.
index: add comments
thread-index-mode: fix wrong method call
Synchronize local modifications back to a Maildir source

Add the "sync_back_to_maildir" option which is false by default. It
works by updating a mail's filename according to the its current
labels in sup.

This commit also adds the :forwarded and :replied hidden reserved
labels to bring a better Maildir support according to [0]. These
labels are automatically added when replying, forwarding or bouncing a
message.

Keep in mind that deleting a mail in sup will set its 'T' Maildir flag
and might be deleted from the disk by software such as offlineimap.

Only messages that have been modified after having applied this commit
will be synchronized.

[0] http://cr.yp.to/proto/maildir.html

Conflicts:
	lib/sup.rb
Add Source#supported_labels? method and improve flash message when polled
Add sup-sync-back-maildir, a script that will sync all your Maildir sources from sup to Maildir
Check that a message has a location before trying to sync it
poll: consider all messages when searching for one in the "delete" case
message: rewrite the sync_back method

I noticed that a sent message can have multiples locations and when
you change its labels only one location is updated (because of the
"location" method). It now synchronizes the message to all its
locations.
message: fix a typo
Preserve unrecognized maildir flags when syncing back.
maildir: fix source pathname after having rebased from master
maildir: fix progress computation for updated messages
poll: Properly refresh thread-index-mode when a message has changed its source location

There are two cases when a message is detected as "updated", whether
its flags has changed or its location pathname has changed, eg. when
sending a message sup generates a Maildir pathname that is then
modified by offlineimap. It would be detected as deleting a message
and adding another one although it concern the same message, in that
case locations should be updated and its thread-index-mode entry
should be refreshed.
sup-sync-back-maildir: set default choice to "yes" when asked for synchronization
Add support for merging Maildir flags to Xapian entries, add a merge feature to sup-sync-back-maildir
sup-sync-back-maildir: add documentation, comments and fix typos
sup-sync-back-maildir: merging is now optional
sup-sync-back-maildir: fix a typo
Check whether the "sync_back_to_maildir" option has been changed from false to true suggest the user to run sup-sync-back-to-maildir before continuing if needed

The check occurs when starting the Redwood module so it affects every
executables loading it since some of them can modify the index (sup,
sup-sync, etc.).

There is a new parameter called "bypass_sync_check" to the
Redwood::start method to bypass this check, it is useful for scripts
such as sup-sync-back-to-maildir itself!

It works by checking the presence of a flag file in the configuration
directory. The file is written when the synchronization is performed
and deleted when the "sync_back_to_maildir" option is set to false.