Declare statics const when they are constant
Merge pull request #1188 from wmtan/DeclareStaticsConst

Multithreading fixes -- Declare statics const when they are constant