Move ThreadEventQueue to its own file.
Add locks to all the pspFileSystem methods.
Handle OpenFile() errors in a more threadsafe way.

Probably needs better cleanup though.
Shutdown the filesystem after HLE.
Unmount filesystems during HLE shutdown.

Fixes #3115.
Fix savestates while not running.

Fixes #2791.
Add one more missing sceCcc func.
Merge pull request #3118 from unknownbrackets/io-async

Prep work for pspFileSystem and two small fixes