Close thread when switching gamestates
Improved SoundLoader class with an improved thread.