imap: fix writer lifecycle, add logging, and parse wildcard flags
- Fix "cannot write to closed writer" by storing TLS flow instead of
Buf_write.t, creating fresh writer for each command
- Add Logs library integration with imap.client source for debugging
- Add --plain flag to use AUTHENTICATE PLAIN instead of LOGIN
- Add Command.pp for safe logging (passwords redacted)
- Fix parsing of \* wildcard flag in PERMANENTFLAGS response
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>