Implement comprehensive IMAP RFC extensions
P0 Critical Fixes:
- Fix SEARCH response parsing in client library
- Add BODY/BODYSTRUCTURE recursive parsing for MIME structures
- Parse BODY[section] literals with section specifiers
P1 Core Protocol Compliance:
- ESEARCH (RFC 4731): search_return_opt types, MIN/MAX/COUNT/ALL
- Parse APPENDUID/COPYUID response codes with UID set parsing
- Add UNSELECT capability (RFC 3691)
- Add SPECIAL-USE capability and mailbox mapping (RFC 6154)
P2 Extension Support:
- THREAD (RFC 5256): algorithm types, response parsing, server handlers
- Base subject extraction per RFC 5256 Section 2.1
- QUOTA (RFC 9208): resource types, GETQUOTA/GETQUOTAROOT/SETQUOTA
- LIST-EXTENDED (RFC 5258): selection/return options, CHILDINFO
P3 Advanced Features:
- UTF-8 support (RFC 6855): validation, UTF8=ACCEPT capability
- CONDSTORE (RFC 7162): MODSEQ, Highestmodseq/Nomodseq/Modified codes
New modules: thread.ml, subject.ml, utf8.ml
New tests: 187 tests passing (was ~150)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>