Cache pid.

This way, the pid is correct from other places.

https://github.com/defunkt/resque/issues/857\#issuecomment-15228388

Closes #857.