Cache TaskConfigFactory per thread

TaskConfigFactory is a cache of task configs. But its instance could be
duplicated in the same thread when a class injects it, which defeats
the purpose of it being a cache. Thus cache TaskConfigFactory instance
per thread. Also rename the class to TaskConfigCache instead of
TaskConfigFactory to better reflect its purpose.

Update gerrit docker image to 3.5.6 so that all the core per thread
cache fixes are available.

Change-Id: I381c4c8f239da19449eb70074fe59bc65567ee45
4 files changed