API: Add exception logging for gearman threads

Change-Id: I0b260d22436920021b39c04b6e53196cca383a4c
Merge "API: Add exception logging for gearman threads"