Don't register QueuedJobService shutdown when running tests

Causes a big SQL failure at the end of a dev/tests run, because
there's no database available to run the shutdown database query.

This won't affect unit tests faking shutdown, as they call `onShutdown`
explicitly, instead of through `register_shutdown_function`.