Remove unbinding before removing listeners

I have added a test for #302.
It fails without my fix very often, but it depends on system and processor cores load.
I think that I can't write a test that fails in 100% of runs because bug is not reproducible when spicemanager thread is running on same processor core as main thread.
Actually, I wouldn't have been working on this issue if I hadn't faced it in my real project. I have a crash when I click back button many times fast, which causes spicemanagers be stopped right after they were queued some requests to execute.