worker: shutdown gracefully even if no gearman connection

- previously got error: Cannot read property 'bufferSize' of undefined
- this occurred when failed to connect to the gearman machine
Merge pull request #21 from Clever/shutdown-gently-if-no-gearman-connection

worker: shutdown gracefully even if no gearman connection