Respect the 'run tasks in background' setting for triggers as well

From #1477 I realised QS doesn't currently run triggers in the background, ever. That's not so good :/

I've fixed this now. It would have been nicer to tie it into the existing code that checks for this setting, but that's related to the interface, and this is related to triggers (which don't use the interface, so they'll have to be independent