[CSL-525] Use bracket to acquire LRC lock, refactor
[CSL-525] Use bracket to acquire LRC lock, refactor

input-output-hk/pos-haskell-prototype,input-output-hk/pos-haskell-prototype,input-output-hk/cardano-sl,input-output-hk/cardano-sl,input-output-hk/cardano-sl,input-output-hk/pos-haskell-prototype,input-output-hk/cardano-sl