This branch adds temporary code for compressing image attachments to fit within the current 32 KiB message size limit. Once large message support is merged we can remove this code or update it to use more moderate compression, perhaps with a setting to choose whether to send compressed or uncompressed attachments.
The first commit, which contains most of the changes, is refactoring to extract the code that finds the size of an image from an InputStream, which the second commit uses when creating attachments as well as when loading them. Interfaces were extracted from the AttachmentRetriever and AttachmentCreator classes to allow ConversationViewModel to inject them. We can keep most of these changes even if we remove compression later.