Added in support and test for pthread_detach

Hello,

I added support for pthread_detach(). You can call it via $thread->detach(); 
I was sure on the style guidelines so I tried to match it the best I could. 

Best Regards,
Will