uwrap: Rewrite uwrap_libc_fns struct to pass strict aliasing rules.

Now uwrap is compiled with -O2 -fstrict-aliasing -Wstrict-aliasing=2
C compiler flags.

Also rename struct uwrap_libc_fns fns to uwrap_libc_symbols and
uwrap_load_lib_function to uwrap_bind_symbol (same for _uwrap_load_...
variant.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
uwrap: Prepare for overload of libpthread functions.

uwrap_bind_symbol are now renamed to uwrap_bind_symbol_libc
and simlilar uwrap_bind_symbol_libpthread are introduced.

New internal uwrap_copy_id has been added.

Patch also introduces UWRAP_LOCK_ALL and UWRAP_UNLOCK_ALL which make
locking easier.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
uwrap: Support scenario where threads creates threads.

uwrap catches calls of pthread_create() and pthread_exit() functions from libpthread library now.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
tests: Add new test_thread_create_thread_setgid.

Test aims case where thread change uid/gid and then create new thread.

Signed-off-by: Robin Hack <hack.robin@gmail.com>