Prototype writing build outputs on a background domain
A trace of a real project showed compiler workers spending 16-25% of their time publishing outputs, and each write taking twice as long with 8 workers writing at once. With RESCRIPT_BACKGROUND_WRITES=1, the held outputs (.ast, .iast, .cmi, .cmt, .cmti) now go to a queue that one writer domain writes in order, so workers go back to compiling. The build file store keeps serving the contents until they are on disk: the writer's atomic write does not make the store forget the path, and a typed tree leaves the store only once it is written. The parse and compile phases wait for the queue when they end, and the first write error fails the build there. Without the variable every write runs right away, as before.
With RESCRIPT_TRACE, every write is now a span named after its file with its size and kind, on the writer's track or inside the worker's publish span.
On tests/tests (690 modules), clean builds with the writer leave the same 3484 output files and take 0.270 s instead of 0.295 s (median of 10). A write takes 47-115 us on the writer and 169-201 us with 8 workers writing, and the build never waited for the writer.