drop needless gc in tsc_wrapped
drop needless gc in tsc_wrapped

When running as a worker, we garbage collect between each compilation
so that our memory statistics make sense over time.  But when running an
individual compilation, there's little point in running garbage collection
right before we're gonna exit anyway.

The code I deleted in this CL is executed in both paths (worker and not),
and there's a separate call to gc in the worker codepath (not in this CL),
so there's no reason to have also gc'd here.  I suspect this was a
mistake during some refactor.

While I'm at it, also rearrange a bit of the code to remove some random
duplication.

PiperOrigin-RevId: 310159657

bazelbuild/rules_typescript,bazelbuild/rules_typescript,bazelbuild/rules_typescript