Improve detecting of attachments

This patch makes it "ignore" single-part multipart/* and any multipart/signed.
In any of these cases, the actual nested MIME part is checked.

Support for proper handling of multipart/alternative got added as well.

v2: Refactoring, and disregard any multipart altogether, i.e. just look at the
nested body parts. See inline comments for details.

Thanks to Thomas Lübking & Stephan Platz for their review.

BUG: 332915
REVIEW: 117360