Merge branch 'networksession-optional'
IMAP: do not leave lingering tasks behind when mailbox syncing fails

When the ObtainSynchronizedMailboxTask failed, the waiting KeepMailboxOpenTask
would not unregister itself from the Parser's maintainingTask, and therefore
further tasks kept getting queued "behind" this KeepMailboxOpenTask which stuck
for all practical purposes.

This does not fix #320713 (no UI popup is shown), but at least it makes sure
that further activity can be resumed. A proper indication should be added,
definitely.

CCBUG: 320713
tasks: Better propagation of the reason why this task failed

My original idea at the time this code was written was (IIRC, it's been ages)
roughly something like "well, whatever, use specific signals for propagating
each and every possible error". This was never implemented, of course.

Now, some errors arguably deserve a dedicated signal, but in other circumstances
the fact that something failed is enough; the remedy is usually the same anyway
-- either give up and tell the user that she's got bad luck, or try again later.
Now, it is still useful to at least show the reason to the user. What is missing
here is a piece of code which will let the user know that his mail won't load
because the mailbox couldn't be synced. This will have to come later.

In the meanwhile, let's keep track of the error message so it isn't lost. My
current motivation for this is that the communication between the KeepMailboxOpenTask
and the ObtainSynchronizedMailboxTask uses the standard Tasks API, i.e.
signalling failure via the failed() signal. Instead of extending the API to be
"magic", better add the message to the existing channels.
IMAP: better error handling for further arrivals after initial sync

CCBUG: 320713
IMAP: Scream loudly when mailbox cannot be opened
Merge branch 'bug-320713'

BUG: 320713
REVIEW: 116834
net: Tell the user about a progress when opening the network session

I'm not sure whether I like this approach or not -- conceptually, the "waiting
for QNetworkSession to come up" is *not* a connection state, at least not with
the current Trojita's IMAP architecture where the IMAP code does not even open a
network connection until the NetworkWatcher tells it that the network is
available.

I guess it might be better to modify the GUI to show a clear and concise
indicator of the connectivity status which is separate from the IMAP state
machine altogether. Let's do that in another patch.

REVIEW: 116833