ChdFileReader: implement precaching of CHD files within PCSX2 instead of modifying libchdr
Description of Changes
Removes the patches applied to libchdr, and instead uses libchdr's virtual IO API to achieve the same behaviour.
Rationale behind Changes
Such patches can be missed when updating dependencies, potentially leading to difficulty updating.
We now also precache parent CHD files, which the patched libchdr did not.
Includes on https://github.com/PCSX2/pcsx2/pull/12075
Suggested Testing Steps
Test precaching using CHD files
I know it's not ready for review, but I was curious and ran it through a profiler and verified that there is no significant performance decrease or increase. We are still fread() bound.
Marking this as ready.
I'm not yet 100% sure on FileSystem::ReadFileWithPartialProgress, so I'm open to suggestions if anyone has a better idea, but if you think it's fine then I'm happy with it.