Implemented pre_term_timeout including test

Implements the same functionality but includes a test of the signal handling to make sure things are working properly.

See https://github.com/resque/resque/pull/1136 for a description of the use case for this code.
Nitpick: It'd probably make sense to require `pre_term_timeout` be nil or numeric when being set, instead of `#to_f`-ing it at runtime:

~~~ ruby
          if pre_term_timeout && pre_term_timeout > 0
~~~