Refactor some lock manager code to re-use for aborting deadlocked txns.