Changed @in_task to be correctly modified if an exception is raised while executing a task
Merge branch 'ruby2-signals' into parent-process

This adds the latest changes from ruby2 signals, so that accepting this pull request
doesnt affect the improvement made in another branch.