Make gson a ThreadLocal, in an attempt to remove IllegalStateException

We've been seeing the errors intermittently, and all roads are leading
to a threading problem, so this commit is an experiment to see if it
goes away