fix many deadlocks.

Raise sigtrap to kill all slaves on Execptions.

sigtrap is caught by master to raise an exception.
release all mutex/semaphores on master when sigtrap is received,
so that python will jump to __exit__ of Parallel correctly.