fixes: pcntl_sigtimedwait missing(on mac), composer syntax error

The unexpected shutdown of master thread was caused by missing function on Mac OS. 
Related error infomation was suppress by "@", which took me lots of time in debugging : (

The previous solution in the project does not work on my laptop. signal-triggered function calls on protected method were outside the instance scope. so I move the code into an protected method in \PHPDaemon\Thread\Generic.