This change adds the ability to call Shutdown on a gearman-go worker which causes the
worker to wait for all currently active jobs to finish and then close the connection.
It does this by keeping tracking of the number of currently active transactions, disallowing
new job creation, and using a WaitGroup to wait for all active jobs to finish.
Dodging the race condition with a sleep was fine, but we slept
for a whole second which was longer than this test takes to run!
I've scaled the sleep down to 250 miliseconds and increased the tries.
Even this is probably excessively long but now the test is fast agin.
* FIX: committed test froze
* FIX: committed test had a race condition!
* Added properly handled panic test
* Timeouts so that these tests should fail now if something goes wrong instead of failing.