Moved some logic off out of worker.perform_job

Hi Vincent,

This is a patch to address https://github.com/nvie/rq/issues/183, making ``worker.perform_job`` simpler. Let me know if you want anything changed.