attachment: fixup r10553, in which the second `sum(attachment.size for attachment in attachments)` consumed the `attachments` iterator, resulting in an empty .zip.
Reuse code from `attachment_data()` which was split into a `viewable_attachments()` method.