Handle TERM/INT hard shutdown with fork-per-job disabled

When forking is disabled, the TERM/INT is swallowed because there's
no @child pid recorded. This causes a Resque::DirtyExit exception to
be raised instead.
Add after_perform hook

I tried to make this compatible with the upstream version:

https://github.com/resque/resque/pull/743

It's a bit off. I'm passing the Worker object to the hook so that
the hook can call #shutdown and exit if needed.