Fix the hashmap & pass semaphores to user-space by object number.

Hashmaps are now bucket based as they should be. Still need to be viewed
though.

The semaphore code was passing the kernel point back to user-space to
speed it up but now it just passes the object number back - the same as
threads.