pthread: more cleanly implement thread return values

Unfortunately pthreads return void*, while C11 threads return int. The C11
standard makes it difficult to implement POSIX-compliant threading, but not
impossible.

I'm cheating a bit here by creating a union of void* and int, assuming that
'int' is always smaller or equal in size to void*.

I was originally going to make the wrapper return a _thrd_wrapper_info pointer,
but then realized that thrd_exit would need that pointer but had no way to get
it. I'd rather avoid adding overly complicated tracking for _thrd_wrapper_info
pointers, so for now let's just go with the hack.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>