This branch improves the handling of missing and invalid attachments.
When an attachment is loaded, the MessagingManager checks that it's an attachment (rather than a private message) and that it has the expected content type. When the UI tries to load the attachments of a private message, it handles NoSuchMessageException by waiting for the attachment to arrive, then trying again. The message is shown without attachments in the meantime.
This branch doesn't completely solve the handling of missing attachments - I think we should show placeholders for missing or invalid attachments, but we can solve that separately after merging this branch.