Rewrite raw memcard threading code. Intended to fix issue 7484.

I just [googled it](https://www.google.com/search?q=signalled) :P
[then again...](https://www.google.com/search?q=signaled)
But yea, I'll change it.