Add XorExtentWriter

This class is built on top of BlockExtentWriter(block aligned writer)
and ExtentMap. It will look at the extent map, convert blocks in the
extent map to XOR type, and convert everythign else to COW_REPLACE.

Test: th
Bug: 177104308
Change-Id: I6f9df83ed09f1c5a6aae9f266412132b002acd29
diff --git a/payload_consumer/block_extent_writer.cc b/payload_consumer/block_extent_writer.cc
index a5c990c..e50526c 100644
--- a/payload_consumer/block_extent_writer.cc
+++ b/payload_consumer/block_extent_writer.cc
@@ -45,7 +45,7 @@
 
   if (buffer_.empty() && count >= cur_extent_size) {
     if (!WriteExtent(data, cur_extent, block_size_)) {
-      LOG(ERROR) << "AddRawBlocks(" << cur_extent.start_block() << ", " << data
+      LOG(ERROR) << "WriteExtent(" << cur_extent.start_block() << ", " << data
                  << ", " << cur_extent_size << ") failed.";
       // return value is expected to be greater than 0. Return 0 to signal error
       // condition