jsapi-util: split a gjs_gc_if_needed() function

We're going to use this later.

https://bugzilla.gnome.org/show_bug.cgi?id=725099
context: add a private method to schedule a GC if needed

There's a bit of a roundtrip between jsapi-util.cpp and context.cpp
here, but we need to save the source ID on GjsContext.

https://bugzilla.gnome.org/show_bug.cgi?id=725099
all: schedule a full GC check after executing JS code

After we return from JS::Call* or JS::Evaluate*, schedule a GC check
for the next idle iteration, to prevent memory consumption skyrocketing.

https://bugzilla.gnome.org/show_bug.cgi?id=725099
test: avoid immediate GC on the Test object

We need to keep this variable alive, otherwise it will be immediately
garbage collected now that we trigger GC when we exit JS.

https://bugzilla.gnome.org/show_bug.cgi?id=725099