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
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.
Merge pull request #5552 from unknownbrackets/font

Improve error codes in sceFont