Fix size handling in sceKernelReferThreadStatus().
Allocate thread stack on create, not on start.

Also, don't free and reallocate on thread reset.
Cleanup some unused / duplicate code in threading.
sceKernelWakeupThread() should reschedule on wake.

Otherwise it will have different timing than the PSP.
Handle a few errors on thread create better.

Especially out of stack space.
Validate sceKernelStartThread() args better.
Fix initial thread stack, arg space and alignment.

Anything that used > 256 bytes of args was probably broken...
Merge pull request #1563 from unknownbrackets/thread-funcs

Fixes to thread funcs, stack, etc.
Merge pull request #1564 from CrazyMax/master

hide battery status icon