sceKernelWaitThreadEnd(), ...ReleaseFromWait(), and warnings

Implements the things in hrydgard/pspautotests#43.  Note that:

 * I was too much of a coward to make the `sceKernelCreateThread()` test pass so I added warnings for now.
 * `sceKernelWaitThreadEnd()` doesn't entirely pass tests because `sceKernelTerminateDeleteThread()` doesn't delete the thread (which it should), but I'm assuming this is a hack to fix some game (been there since the initial commit, 4f7ad157.)
 * Also I wonder why `sceKernelExitDeleteThread()` seems to intentionally leak the stack (introduced in c61d10363a10d81301dcac71cdcc76cb2b6a1489.)

Oh, breaks savestates.  Sorry.

-[Unknown]