Fix crash when backgrounding app

This fixes a crash where backgrounding the app and getting a crash that a GPU operation is not allowed. You are still responsible for stopping and starting the capture session when your app gets backgrounded and re-opened.