Fix app-lifetime thread regression on JVM backend.

The thread pool scheduler wants its threads to be background ones, but
they were not marked as such. This caused hangs at process end.