Mailbox client for our own mailbox
Mailbox clients for communicating with our own mailbox and contacts' mailboxes are managed by a singleton mailbox client manager (#2228).
This ticket covers the client for communicating with our own mailbox. Some code will be shared with the client for communicating with a contact's mailbox (#2289). The shared code is covered by #2229.
The client's connectivity check will use #2170.
* At any given time the client has zero or more contacts assigned for upload and zero or more contacts assigned for download
* Each contact assigned for upload has its own upload worker
* The client has a single download worker that's shared by all contacts assigned for download
* The client also has a single contact list worker
When the client is created:
* Create and start the contact list worker (#2294)
When the client is destroyed:
* Do all the stuff the superclass does when it's destroyed
* Destroy the contact list worker
When a contact is assigned for upload:
* Create and start the contact's upload worker (#2291)
When a contact is deassigned for upload:
* Destroy the contact's upload worker
When a contact is assigned for download:
* If this is the only contact assigned for download:
* Create and start the shared download worker (#2293)
When a contact is deassigned for download:
* If there are no more contacts assigned for download:
* Destroy the shared download worker
issue