protobuf: split codec GADT into its own module
Move the codec type, the 15 scalar codecs, the [Message] combinators,
and [fix] into [lib/codec.ml] / [lib/codec.mli]. The top-level
[Protobuf] module now aliases [type 'a t = 'a Codec.t], re-exports
the scalars and [Message] for ergonomics, and keeps only the
reading/writing entry points ([of_string] / [to_string] /
[of_reader] / [to_writer] plus [_exn] twins).
Motivation: match the one-file-per-concern layout already used in
[ocaml-json], [ocaml-cbor], and [ocaml-xml]. A later split will
extract a [Value.t] AST and a [Cursor] zipper.
[codec.mli] exposes:
- [type 'a t] (abstract)
- the 15 scalar codecs
- [module Message] with required/optional/repeated/packed/map/oneof
- [fix]
The codec's four IO walkers ([encode_string] / [decode_string] /
[encode] / [decode] and the unknown-fields pair) are under a
[(**/**)] internal section because the top-level [Protobuf] module's
[of_*] / [to_*] functions are the stable public surface.
Files:
lib/codec.ml [new, 886 lines]
lib/codec.mli [new]
lib/protobuf.ml [rewritten: 52-line re-export + IO shim]
lib/protobuf.mli [rewritten to match]
All 53 unit + 17 fuzz + 2 protoc interop tests pass.