Merge pull request #10435 from AdmiralCurtiss/savestate-crash Core/State: Add some multithreading protections.