fix(email): degrade gracefully on malformed address headers
partition_email raises an uncaught IndexError on a valid .eml whose To/From/Cc/Bcc header contains a malformed address such as an unterminated quoted string. The message is parsed with policy.default, whose structured address parser runs eagerly on get_all("To"), and since email_metadata is computed for every element, one corrupt header aborts the whole partition. Reproduces on Python 3.11 and 3.12:
import io
from unstructured.partition.email import partition_email
partition_email(file=io.BytesIO(b'To: "\r\nFrom: a@b.com\r\n\r\nbody\r\n'))
# IndexError: list index out of range (email/_header_value_parser.py, local_part)
The fix routes the four address properties through one helper that keeps the policy.default parse (so encoded-word decoding for well-formed headers is unchanged) and falls back to a lenient compat32 re-parse only when it raises. Well-formed addresses in a mixed header are still recovered; a wholly malformed header degrades to None. Includes regression tests for each header and an end-to-end partition test.