Move update and input event loops into their own goroutines.