Fixed bugs for speed and survival modes

Speed and survival modes use threads to control the game. These threads
were not being stopped when restarting the game or leaving the app
causing it to crash.

Fixes #108 Restarting speed mode mid game causes tiles to appear 2x
speed