This reverts commit 9ec9fee57f.
This commit broke reporting JGit metrics. All metrics affected by this
reported value 0.
When debugging this problem it turned out the static method
WindowCacheStats#getStats was evaluated too early when the
JGitMetricModule#configure method was run.
Instead it should be evaluated when the supplier's get method is called.
Gerrit reconfigures the WindowCache using the configuration given in
etc/gerrit.config. During this reconfiguration a new WindowCache
instance and consequently also a new StatsRecorderImpl instance is
created. Though the JGitMetricModule still had a reference to the old
WindowCache's StatsRecorderImpl which never saw any metric data since
the new WindowCache was using the new StatsRecorderImpl instance after
the WindowCache reconfiguration.
Change-Id: I9818eae94caccf330f914fd49e4d875b51cf18fd