Shut down the gearman server last in tests

In particular, shut it down after all its clients have been shut
down.  In some cases, it was shut down early enough that the RPC
listener was able to attempt to reconnect to it and trigger a
rare condition in gear that would cause the reconnection thread
to hang.

Change-Id: I1dc5d77484eabf9fa43f16ae8295ddb4df4af056
Merge "Shut down the gearman server last in tests"