Background tasks

We've added a backgroundTask() helper to all generated codebases by default. You can use this to run code in background goroutines and wait for it to complete during a graceful shutdown.