Add ppxlib support to PPX preprocessing pipeline
Integrate ppxlib's Driver.map_structure into the toplevel's PPX
preprocessing, supporting both old-style Ast_mapper PPXs (like
js_of_ocaml's Ppx_js) and modern ppxlib-based PPXs.
Changes:
- Add ppxlib as a dependency in lib/dune
- Modify JsooTopPpx to chain old-style mappers with ppxlib Driver
- Handle AST version conversion between compiler's Parsetree and
ppxlib's internal AST using Selected_ast.of_ocaml/to_ocaml
- Fix typecheck_phrase to use JsooTopPpx.preprocess_phrase for
consistency with execute (was using Toploop.preprocess_phrase)
- Add node-based PPX test verifying the preprocessing pipeline
The preprocessing order is: old-style Ast_mapper rewriters first,
then ppxlib transformations. This allows both types of PPXs to
coexist and be applied correctly.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>