[LockManager] Refactoring to allow proper cross-wiki support.

Change-Id: I331d011a6fa4edd434f0fb547d325ad60901119d
Merge "[LockManager] Refactoring to allow proper cross-wiki support."