Extract locking from main Cache class to LockManager and LockStoreInterf...

...ace.