Cleanup sceFontNewLib() parameter handling.

It should error out without alloc/free funcs, and cap numFonts to 9, per
tests.  Most games pass these and use numFonts = 4.
Allocate the right amount of font memory.

But it should be in multiple blocks...
Return an error on font allocation failure.

Some game might actually expect this code, you never know...
Populate the native font lib struct.

For now, this makes things a lot easier to compare (getting as much info
as possible out of these structs.)
Improve error codes in sceFontOpen*().

Fixes some unlikely cases of crashes as well.  I think there are leaks
here...
Pass in the font open mode for easier tracking.

Mostly concerned about handlers actually doing something...
Revert "Reset resample hist on keyon, round up read."

This reverts commit 3edebbfba9d13e26e736107cb8fb8ad4efb65a8d.
Revert "Actually use the resample buffer."

This reverts commit dc5d17971c9821afc7d44829235c799788ef724e.
Revert "Optimize mixing samples at common pitches."

This reverts commit dd434cd7c5dd35bc8b82b4a2e00f2787300c61e9.

Conflicts:
	Core/HW/SasAudio.cpp
Revert "Smooth SAS resampling when pitch != 0x1000."

This reverts commit 1efcebb1210e6edb9691205b42c18c6a8fd0bd3a.
Allow open fonts in a few more calls.

It turns out if you open the same internal font twice, they both work
until you close both of them (it's reference counted, but the font handles
are different.)

Anyway, these funcs seem to crash on a PSP when used with a non-open font
so there's not a ton of risk here.
Oops, still had an unaligned stack in some thunks.
Implemented sceKernelICacheInvalidateRange

Fixes crash in mhp3 hot springs after some missions
Merge pull request #5552 from unknownbrackets/font

Improve error codes in sceFont
Merge pull request #5551 from unknownbrackets/sas-minor

Revert resampling changes
Merge pull request #5554 from hilesaz/master

Implemented sceKernelICacheInvalidateRange
Try to fix Stylus input, this needs testing to see if it interferes with Touch
actually handle pen/touch disambiguation, now let's hope no driver misreports this
Merge pull request #5558 from Bigpet/master

Try to fix Stylus input for Windows Vista/7/8
Update native