Correct retrieval of stack address and size when getting the current
thread attributes for the main thread.
Add emulation of native threads (libc_r) method of getting the current
thread attributes (pthread_attr_get_np()) and adjust emulation of native
threads pthread_attr_getstackaddr() to return bottom of stack instead of
top of stack.
Correct emulation of native threads pthread_mutexattr_settype() when
selecting recursive mutexes. Previously, the argument conversion before
calling the linuxthreads version of pthread_mutexattr_setattr() ended up
selecting errorcheck mutexes instead of recursive mutexes.