Prevent blur and focus events from getting confused

- Without patch, it is possible to enter a strange state in some cases with two background music tracks playing simultaneously.
- Try with Whack-a-Mole:
  * Start Whack-a-Mole
  * Open Chrome dev console
  * Focus the Chrome dev console and reload with CMD+R or CTRL+R
  * After the game has reloaded and is playing, focus the canvas
  * Result: Two music tracks will be playing.