Fix lifetime of KeepMailboxOpenTask

Turns out that there was no place where a dying KeepMailboxOpenTask would
disassociate itself as the Parsre'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