Add reporting for color test function
Support some thread stack attr options.

May improve memory management in some games.
Validate and report some thread attributes.
Eat cycles after creating a thread.

Improves things on some tests, should be more accurate.
Creating a thread sure takes a long time.
Set the low mystery bits of the thread attr.

Tests on PSP show this, and I can't find a way to not have them set.
But I don't really know what they mean.

Anyway, since you can refer the status, you can see them, may improve
compatibility.
Reset thread priority on terminate.
Reset waits when terminating a thread.

Terminated threads can't be waiting.
Return a negative error code in __KernelGetWaitID.

This way we can use 0 as a proper wait id.
Fix really stupid heap corruption mistake.
Add a few new syscalls from reporting.
Log when syscalls fail due to intr/dispatch.
Improve volatile mem locking w/ suspended intr.
Merge pull request #3711 from unknownbrackets/thread-minor

Fixes to various thread functions + heap corruption fix
Merge pull request #3712 from unknownbrackets/volatile-mem

Improve volatile mem locking w/ suspended intr
Offset the root thread's stack by arg size.

Otherwise it'll just overwrite, right?
Correct sceKernelGetThreadStackFreeSize().

It was always returning 0.
Don't write more than the savedata buffer.

Fixes Numblast when there's savedata, probably others.
Could use more testing.
Merge pull request #3714 from unknownbrackets/savedata-minor

Don't write more than the game's savedata buffer
Merge pull request #3713 from unknownbrackets/thread-stack

Correct sceKernelGetThreadStackFreeSize()
Merge pull request #3705 from raven02/patch-1

Add reporting for color test enabled