There is a command and config option. The criteria are a list of the
sort criterion and each can be individually reversed.
This only includes support for sorting in the maildir backend currently.
The other backends are not supported in this patch.
Things like FetchEntityPartReader etc can be reused by most workers
working with raw email files from disk (or any reader for that matter).
This patch extract that common functionality in a separate package.