The HTTP request and stream session wrappers hold JavaScript references
that were invisible to the QuickJS cycle collector. For example, this
creates a cycle through the native request wrapper:
function content(r) {
r.args.request = r;
r.return(200);
}
When the context was destroyed, the collector could leave this graph in
the runtime, causing a worker abort in an assertion-enabled build or a
leak otherwise. Cached request and response bodies had the same
ownership problem. A stream callback capturing its session formed an
equivalent native cycle.
Add gc_mark callbacks symmetric with the class finalizers. Stream
callbacks can now rely on normal cycle collection, so remove the special
teardown path that released them before the common exit-hook and pending
job processing.