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.)
fix a wrong parameter
minor change in file filter
remove a redundant assignment
remove a duplicate assignment
remove some redundant brackets
Improve error codes in sceFontOpen*().

Fixes some unlikely cases of crashes as well.  I think there are leaks
here...
Reset resample hist on keyon, round up read.

If we have an uneven pitch, round up so that we get the next sample to
resample in.
Pass in the font open mode for easier tracking.

Mostly concerned about handlers actually doing something...
Merge pull request #5548 from unknownbrackets/sas-resample

Reset resample hist on keyon, round up read
Merge pull request #5546 from chinhodado/fixes

some minor fixes and changes
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.