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

@lioncash what do you mean? It's not virtual, and there are 4 other preexisting functions in that class with bodies in the header.