IMAP: fix deleting of currently selected mailboxes

All deletion attempts are now scheduled via the KeepMailboxOpenTask. If the
mailbox being deleted is currently selected, it will be destructively closed
(and a random subset of messages removed, see RFC 3501) by sending of the CLOSE
command. Afterwards, the actual deletion happens as usual.

There's a couple of corner cases, hence the number of test cases. Hope this is
enough.
Fix lifetime of KeepMailboxOpenTask

Turns out that there was no place where a dying KeepMailboxOpenTask would
disassociate itself as the Parser's maintaingTask (not to be confused with a
mailbox' maintaingTask). This is a prerequisite for the next commit; the test
added in it was enough to trigger a rather confusing backtrace.
Make it possible to switch to another mailbox after the old one was deleted
Merge branch 'deleting-mailboxes-unselect'

BUG: 331680
REVIEW: 116791