[LevelDBScopes] Extract Range & Lock classes, add multi-level acquire.

This patch
 * extracts ScopeLockRange and ScopeLock classes into separate files,
 * implements a multi-level lock acquisition algorithm to acquire a
   collection of locks together
 * clarifies the invariants of DisjointRangeLockManager

Bug: 862456
Change-Id: I2702237dfa7e5213e7cd395d3c8fcfeeaf86898e
Reviewed-on: https://chromium-review.googlesource.com/c/1258218
Commit-Queue: Daniel Murphy <[email protected]>
Reviewed-by: Victor Costan <[email protected]>
Reviewed-by: Chase Phillips <[email protected]>
Cr-Commit-Position: refs/heads/master@{#616070}
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 987ff19..79884b64 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -1026,6 +1026,10 @@
     "indexed_db/list_set.h",
     "indexed_db/scopes/disjoint_range_lock_manager.cc",
     "indexed_db/scopes/disjoint_range_lock_manager.h",
+    "indexed_db/scopes/scope_lock.cc",
+    "indexed_db/scopes/scope_lock.h",
+    "indexed_db/scopes/scope_lock_range.cc",
+    "indexed_db/scopes/scope_lock_range.h",
     "indexed_db/scopes/scopes_lock_manager.cc",
     "indexed_db/scopes/scopes_lock_manager.h",
     "initiator_csp_context.cc",