libhybris hooks improvements and fixes

These changes correspond to the use of shared memory when dealing with shared mutex/conditions/rwlock, plus a little fix for hooking pthread_cond_timedwait_relative_np correctly.
The first two commits may have been merged, but I didn't do that to better see the progress of this implementation.