make GearmanProxy a singleton

Refactor GearmanProxy to be a singleton instead of using static fields
and methods to manage thread states.

Change-Id: I8d84778f0e0d7020bb08087be29808f46aff8786