Catch exception during connection to the server

Bug in pecl gearman extension:

https://bugs.php.net/bug.php?id=63041
Merge pull request #80 from myurasov/patch-2

Catch exception during connection to the server (happens due to the bug in pecl extension)