Switch to file descriptors instead of FILE *.

This allows us to support the io modes more accurately, not truncating for create/write, etc.
Attempt to virtually handle truncation properly.

Fixes LittleBigPlanet save problem, at least on US.
Improve error handling when PARAM.SFO can't read.
Fix stack overflow on x64 with memchecks, darn it.
Merge pull request #5454 from unknownbrackets/io-minor

Improve truncation handling on all platforms
Merge pull request #5489 from unknownbrackets/jit-minor

Fix stack overflow on x64 with memchecks, darn it
Win32: Make PPSSPP DPI aware to avoid flickering in fullscreen on some PC hardware setups.
Use a safer method of calling the DPI stuff.
Merge pull request #5494 from thedax/win32DPIAware

Win32: Make PPSSPP DPI aware to avoid flickering in fullscreen on some PC hardware setups.
Detect bad mipmap sizes, autogen mipmaps in this case. Might help part of #2603

(outrun)
Ignore local build tools, Mac OSX 64-bit, NDK r9c Updates