Add new commandline action to invoke the syncing of tags to folders.

The invoked action is a dummy so far.
Add TagSyncher stub

So far the TagSyncher is called for a hard coded maildir with no rules
specified. All it does so far is retrieve all mails for the given folder.
Find mails that need to be moved

TagSyncher::sync() is now called with a static set of rules for testing purposes.
It finds mails that need to be moved (negated tags not yet possible).
Handle negative tags

Find mails that are to be moved since they are *not* tagged with a *negative*
tag.
Honor the sequence in which the rules have been specified.
Apply only one rule per mail since you don't wanna duplicate mails by moving
them into several maildirs.
Move mails

Actually move mail files identified for syncing (cf issue #4).
Dry mode not yet supported (cf issue #9).
Update notmuch database after syncing

Call the notmuch binary with the 'new' parameter since the python bindings don't seem to
support that functionality (cf issue #5).

If you don't wanna follow sync()'s request to terminate the program after
failing to update the db, just catch the SystemExit exception and handle it your
way.
Use logging

Utilize the nifty existing logging infrastructure (which is nicely integrated with the
cli!) instead of crude print()s.
Make tag sync rules configurable

Teach the config parser to read the rules that define how tags are to be
synced to maildir folders (cf issue #6).
Remove hard coded test rules.

NOTE: I potentially changed the behaviour of the config parser by preserving
      the capitalization of the keys. If this breaks existing functionality, I
      will have to work around this (desirable) feature.
Add functions to get formatted message details

Add helper that provides a minimalistic yet usually sufficiently unique human readable string
identifying a message (to replace Message()'s __str__ implementation).
Additionally provide minimalistic 'From' string.
Honor dry runs

Don't move mails, don't update the db (cf issue #9).
Be a bit more verbose about what you /would/ do, since that is what the user
will be interested in with dry runs.
Encapsulate updating of database

By extracting the functionality into its own method, it will be easier to
replace the implementation once the python bindings support the 'notmuch new' command.
Add doc strings

Document the private helper methods.
Restrict syncing to mails not older than given age

Syncing only tags of recent mails will improve performance when working on large
maildir folders (cf issue #11).
Age has to be specified in days.

Note: So far the used age is a dummy value hardcoded for testing purposes.
Refine configuration of sync rules

The config parser won't treat all options in the TagSyncher section as rules
anymore. Instead, a new option 'folders' is required that contains a whitespace
separated list of maildir folders that are to be synced. Only options with keys
matching a specified folder will be considered rules.

The new option is mandatory when calling afew in sync mode.
For each specified folder an option with a corresponding key is mandatory.
Make age of mails to be synced configurable

Teach config parser to read max_age from config file, use it instead of
hardcoded dummy (fixes issue #11).
Add example config for TagSyncher

Add example of basic but reasonable settings as comments to default
config. Meaning of options and resulting behaviour still undocumented.
Add documentation on sync mode

Explain mode of operation, configuration options (cf issue #10) and limitations
(cf issues #8 and #12).
Use notmuch to identify mails

Don't get *all* mails from the current maildir folder and check for each one
*manually* whether it matches the configured tag. Instead construct a notmuch
query, get only those mails from the db that match the configured tag and
move those.

The new implementation is not only more elegant (manually checking *each* mail again
and again is pretty raw), it should help performance significantly (xapian is
very good at finding stuff ;)).
Encode message summary as unicode

The summary contains the subject of the summarized message, which may contain
unicode characters.

Also encode uses of message summary.

Fixes "UnicodeEncodeError: 'ascii' codec can't encode character"
Allow arbitrary queries in rules

Use arbitrary notmuch search queries in tag sync rules instead of the old custom
syntax that only allowed single positive and negative tags. This enables
conjunctions and disjunctions in rules and makes syncing rules much more
powerful (cf issue #12).

In fact, the gained functionality makes the designation 'Tag Syncher' obsolete.
Basically, this module became a 'Mail Mover', enabling moving of mail files
between maildir folders based on arbitrary (notmuch-searchable) parameters.

I am considering transferring the functionality into a filter (and renaming it).