update_engine: Further move Extent manipulation to extent_utils.

This patch moves more Extent manipulation functions to extent_utils.
It moves NormalizeExtents() and creates a new ExtentsSublist() function
that will be used by a follow up CL.

BUG=None
TEST=Added unittests.

Change-Id: Icf0ef0af208aa45c9f44e1a73662b3efd8bbbb45
Reviewed-on: https://chromium-review.googlesource.com/275801
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
diff --git a/test_utils.cc b/test_utils.cc
index e2361a5..712df64 100644
--- a/test_utils.cc
+++ b/test_utils.cc
@@ -31,6 +31,10 @@
 
 namespace chromeos_update_engine {
 
+void PrintTo(const Extent& extent, ::std::ostream* os) {
+  *os << "(" << extent.start_block() << ", " << extent.num_blocks() << ")";
+}
+
 namespace test_utils {
 
 const char* const kMountPathTemplate = "UpdateEngineTests_mnt-XXXXXX";