Add type Obj.raw_data and functions Obj.raw_field, Obj.set_raw_field
Some OCaml objects contain data that cannot be safely represented as an OCaml value (type Obj.t). For example, in no-naked-pointers mode, this is the case for code pointers inside closures, and for the "custom operations" pointers inside custom blocks.
This PR introduces a type Obj.raw_data (an alias for nativeint) to encapsulate this data, and functions Obj.raw_field / Obj.set_raw_field to read and write the "raw" contents of fields of blocks.
Note: just like it is wrong to access code pointers and custom operations using Obj.field / Obj.set_field, it is wrong to access regular fields possibly containing pointers into the OCaml heap using Obj.raw_field / Obj.set_raw_field. The OCaml heap block can be reclaimed or moved after its address was captured by Obj.raw_field. Symmetrically, Obj.set_raw_field on a regular field bypasses the write barrier of the GC. (commit: ec33006)
Remove the primitive functions caml_static_{alloc,free,resize}
These primitives are dangerous because they produce naked pointers outside the OCaml heap, with a risk of "GC pointer confusion". (After caml_free and a heap extension, the freed memory area can be reallocated as part of the OCaml heap, causing the naked pointer to become a bad heap pointer).
These primitives are not used anywhere in the core OCaml system (in particular they are not exposed via the Obj module). An OPAM-wide grep shows no uses there either. (commit: d6f9496)