Fix a typo in the comment
Simplify the code for finding parts via their path

The assert was not terribly useful anyway.
Better checks of the part paths

Let's immediately return a nullptr in case the textual special part identifier
points to some garbage.

Also be sure to check that there are no extra chunks in our location after the
special parts is found. The old version would exit the loop unconditionally,
which is not the right thing to do. We want to return a nullptr on e.g. /TEXT/0,
not treat that as /TEXT.
Only call the dynamic_cast when asserts are enabled
Remove a couple of obsolete FIXMEs

The parts are loaded in batches already by the mailbox keeping task. Also, the
TreeItemPart::fetch and TreeItemPart::fetchFromCache will not trigger the part
load unless the UID is already known, so there's no potential for a remotly
triggerable assert crash here.
IMAP: Implement fetching of raw part data without the CTE decoding

Certain applications, most notably support for signature verification, requires
access to raw, unprocessed part data as returned by the IMAP server. Trojita,
however, is happy to utilize the BINARY extension and stores the data in the
already decoded form.

This patch adds a new special tree item, the OFFSET_RAW_CONTENTS. When accessed,
a request for raw data is made, the result is stored in an appropriate cache
entry and the data are also made available to the "regular" part.
moved decodeTransportEncoding to Encoders to make it accessable for other classes
Imap: distinguish about fetching the processed and unprocessed data

This patch tries to make sure that the data are not kept twice in memory unless
asked to, and that the data in the on-disk cache are not duplicated.

One choice to make is what to do when we already know the decoded data and ask
for the raw data once again. The paranoid option would be to have a look at the
cached, already-decoded data and check whether what we have now matches. The
code will, however, simply leave the older data around and neither check nor
overwrite them with the locally decoded copy.
Const correctness for Cache and its implementations
Coding style
Remove processed data from cache when the raw data are stored

The idea is that both base64 and quoted-printable decoding is blazingly fast, so
it makes a lot of sense to conserve space by saving just a single copy on disk.

Note that no checks are made whether both copies of data are actually the same.
We do actively try to catch the server cheating here.
This is a commit series which makes it possible to request raw, unprocessed data
from the IMAP server. It is needed for signature verification, among other
things, and Trojita's automatic CTE processing interfered with this.

Merge branch 'fetching-raw-parts'

REVIEW: 113375