dynamically add hooks from libc and libdl

Now, the hook table contains only safe pthread functions
and wrapped functions so there's no need for doing
   {"libc_function_name", libc_function_name},

This also makes it easier to split hooks.c into separate files

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>