net: Split the network session management into an abstract interface and an implementation
Make it possible to work even when system claims there's no network

Guess what kinds of features Trojita gains when I'm travelling on a place.

REVIEW: 116832
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