Avoid overwriting io thread results.

Just block until it's done so that things are synchronous.
Synchronize IO operations before any seek.

To prevent it from seeking before the operation.
Allow two threads to read from a file at once.

It just happens in order, rather than failing with an error (async busy.)
Async operations still fail when used in this way, however.
Correct error code for reads into a bad pointer.

Per tests this is generally -1.
Merge pull request #5591 from unknownbrackets/io-thread

Handle concurrent sync io operations better