Make sesison creation thread safe.
Fix long wrap-around in metrics while tracking errorsPerSecond.
Merge remote-tracking branch 'upstream/master'