VM: moves the code that clears the roots to the same function that

It was suggested by Slava that the bugfix for #1083 slightly misplaced in `general_error` which makes sense. So I moved it to `dispatch_signal_handler` instead. It's the function that destroys the stack so it should be more clear what is going on. :)