IMAP in OCaml

Eliminate Obj.magic with type-safe equivalents

Replace unsafe Obj.magic casts with proper type-safe alternatives:

- conpool: Make protocol parameter required, add create_basic for simple
pools. The previous optional protocol with Obj.magic default was
fundamentally unsound as OCaml cannot have optional parameters that
change return types.

- publicsuffix: Add explicit id field to trie_node instead of using
Obj.magic to cast nodes to int for hashtable keys.

- yamlt: Add init_unknown_builder helper that properly handles GADT
refinement, returning () for Unknown_skip/Unknown_error cases where
builder=unit.

- jmap_brr: Use Jsont_brr.encode/decode Jsont.json instead of unsafe
casts between Jv.t and Jsont.json.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+1 -1
+1 -1
PLAN.md
··· 73 73 74 74 let create ~sw ~net ~clock ~host ~port ~tls = 75 75 let endpoint = Conpool.Endpoint.make ~host ~port in 76 - let pool = Conpool.create ~sw ~net ~clock ~tls () in 76 + let pool = Conpool.create_basic ~sw ~net ~clock ~tls () in 77 77 { pool; endpoint } 78 78 79 79 let with_connection t f =