Fix bug in cache (counter not atomic)
Fix bug in cache (counter not atomic)

When reading a value of the cache we had to use unique_lock instead of
shared_lock, otherwise it would crash, it seems this was due to the
variable _hits not being atomic.

If the cache still crashes occasionally after this fix, then I'm
clueless.

inflector/opencog,jlegendary/opencog,inflector/atomspace,ceefour/opencog,eddiemonroe/opencog,TheNameIsNigel/opencog,gavrieltal/opencog,rodsol/opencog,kim135797531/opencog,ceefour/atomspace,andre-senna/opencog,cosmoharrigan/opencog,TheNameIsNigel/opencog,shujingke/opencog,jswiergo/atomspace,iAMr00t/opencog,misgeatgit/atomspace,roselleebarle04/opencog,jlegendary/opencog,yantrabuddhi/atomspace,kinoc/opencog,williampma/atomspace,Tiggels/opencog,inflector/opencog,Allend575/opencog,rohit12/atomspace,sanuj/opencog,misgeatgit/opencog,eddiemonroe/atomspace,sumitsourabh/opencog,MarcosPividori/atomspace,AmeBel/atomspace,sanuj/opencog,roselleebarle04/opencog,andre-senna/opencog,cosmoharrigan/atomspace,kinoc/opencog,roselleebarle04/opencog,Allend575/opencog,ArvinPan/opencog,anitzkin/opencog,ruiting/opencog,andre-senna/opencog,zhaozengguang/opencog,misgeatgit/atomspace,ceefour/opencog,ArvinPan/opencog,prateeksaxena2809/opencog,yantrabuddhi/atomspace,yantrabuddhi/opencog,gaapt/opencog,anitzkin/opencog,sanuj/opencog,ruiting/opencog,Tiggels/opencog,eddiemonroe/atomspace,kinoc/opencog,virneo/atomspace,UIKit0/atomspace,rTreutlein/atomspace,jlegendary/opencog,andre-senna/opencog,jlegendary/opencog,sanuj/opencog,ruiting/opencog,yantrabuddhi/opencog,anitzkin/opencog,Tiggels/opencog,Selameab/atomspace,virneo/atomspace,rohit12/opencog,UIKit0/atomspace,ArvinPan/atomspace,inflector/atomspace,inflector/opencog,AmeBel/opencog,shujingke/opencog,printedheart/opencog,TheNameIsNigel/opencog,gavrieltal/opencog,iAMr00t/opencog,rodsol/opencog,Allend575/opencog,misgeatgit/atomspace,rTreutlein/atomspace,eddiemonroe/opencog,williampma/opencog,inflector/opencog,Selameab/atomspace,gaapt/opencog,UIKit0/atomspace,tim777z/opencog,shujingke/opencog,jlegendary/opencog,williampma/atomspace,virneo/opencog,sumitsourabh/opencog,virneo/opencog,zhaozengguang/opencog,UIKit0/atomspace,andre-senna/opencog,Selameab/opencog,williampma/atomspace,cosmoharrigan/atomspace,Selameab/atomspace,ceefour/atomspace,kinoc/opencog,Tiggels/opencog,anitzkin/opencog,ArvinPan/opencog,ceefour/atomspace,ceefour/opencog,Allend575/opencog,AmeBel/atomspace,printedheart/atomspace,TheNameIsNigel/opencog,roselleebarle04/opencog,yantrabuddhi/opencog,iAMr00t/opencog,AmeBel/opencog,MarcosPividori/atomspace,AmeBel/opencog,yantrabuddhi/opencog,Selameab/opencog,virneo/opencog,AmeBel/atomspace,sumitsourabh/opencog,yantrabuddhi/opencog,virneo/opencog,ceefour/opencog,ceefour/opencog,gaapt/opencog,inflector/atomspace,ruiting/opencog,printedheart/atomspace,eddiemonroe/opencog,inflector/atomspace,shujingke/opencog,prateeksaxena2809/opencog,misgeatgit/opencog,iAMr00t/opencog,rohit12/opencog,tim777z/opencog,gavrieltal/opencog,rodsol/opencog,virneo/opencog,inflector/opencog,ArvinPan/opencog,misgeatgit/opencog,ArvinPan/atomspace,jlegendary/opencog,kim135797531/opencog,rohit12/opencog,kim135797531/opencog,iAMr00t/opencog,misgeatgit/opencog,gaapt/opencog,rodsol/atomspace,andre-senna/opencog,AmeBel/opencog,printedheart/opencog,ceefour/opencog,ruiting/opencog,MarcosPividori/atomspace,rodsol/opencog,misgeatgit/opencog,cosmoharrigan/atomspace,prateeksaxena2809/opencog,eddiemonroe/opencog,kim135797531/opencog,TheNameIsNigel/opencog,AmeBel/atomspace,shujingke/opencog,ArvinPan/atomspace,cosmoharrigan/opencog,misgeatgit/atomspace,rodsol/opencog,AmeBel/atomspace,printedheart/opencog,Selameab/opencog,Allend575/opencog,AmeBel/opencog,rodsol/opencog,rTreutlein/atomspace,andre-senna/opencog,rohit12/opencog,jswiergo/atomspace,zhaozengguang/opencog,rTreutlein/atomspace,ceefour/opencog,TheNameIsNigel/opencog,williampma/opencog,Allend575/opencog,inflector/opencog,zhaozengguang/opencog,sanuj/opencog,kinoc/opencog,gavrieltal/opencog,inflector/opencog,cosmoharrigan/opencog,virneo/atomspace,virneo/opencog,rohit12/atomspace,virneo/atomspace,williampma/opencog,ruiting/opencog,yantrabuddhi/atomspace,rodsol/atomspace,misgeatgit/atomspace,sumitsourabh/opencog,Tiggels/opencog,ArvinPan/atomspace,eddiemonroe/atomspace,inflector/atomspace,kim135797531/opencog,cosmoharrigan/opencog,cosmoharrigan/atomspace,jlegendary/opencog,williampma/opencog,rodsol/atomspace,gaapt/opencog,sumitsourabh/opencog,rohit12/atomspace,AmeBel/opencog,rohit12/atomspace,Tiggels/opencog,rodsol/atomspace,printedheart/atomspace,ruiting/opencog,sumitsourabh/opencog,shujingke/opencog,gavrieltal/opencog,printedheart/opencog,sanuj/opencog,ceefour/atomspace,prateeksaxena2809/opencog,cosmoharrigan/opencog,misgeatgit/opencog,misgeatgit/opencog,kinoc/opencog,Selameab/atomspace,zhaozengguang/opencog,inflector/opencog,gavrieltal/opencog,tim777z/opencog,misgeatgit/opencog,kinoc/opencog,roselleebarle04/opencog,yantrabuddhi/opencog,williampma/atomspace,misgeatgit/opencog,iAMr00t/opencog,cosmoharrigan/opencog,eddiemonroe/atomspace,printedheart/opencog,kim135797531/opencog,rohit12/opencog,prateeksaxena2809/opencog,eddiemonroe/opencog,prateeksaxena2809/opencog,roselleebarle04/opencog,yantrabuddhi/opencog,jswiergo/atomspace,jswiergo/atomspace,gaapt/opencog,printedheart/atomspace,kim135797531/opencog,shujingke/opencog,eddiemonroe/atomspace,Selameab/opencog,anitzkin/opencog,AmeBel/opencog,tim777z/opencog,ArvinPan/opencog,anitzkin/opencog,eddiemonroe/opencog,Selameab/opencog,virneo/opencog,ArvinPan/opencog,zhaozengguang/opencog,Selameab/opencog,yantrabuddhi/atomspace,rohit12/opencog,MarcosPividori/atomspace,printedheart/opencog,williampma/opencog,prateeksaxena2809/opencog,tim777z/opencog,tim777z/opencog,yantrabuddhi/atomspace,williampma/opencog,sumitsourabh/opencog,gaapt/opencog,anitzkin/opencog,eddiemonroe/opencog,Allend575/opencog,rTreutlein/atomspace,roselleebarle04/opencog,gavrieltal/opencog