[LockManager] Refactor lock TTL code to base class.

* Also made the TTL configurable.

Change-Id: I713979267fe7bd92ac6cd5fe4d4168d20e539c75