Make statics const in LeafRefCandidateT

Changed function local statics to const. This has no functional change but avoids complaints from the static analyzer.
Merge pull request #1879 from Dr15Jones/makeStaticsConstInLeafRefCandidateT

Multithreading fixes -- Make statics const in LeafRefCandidateT