AU: Extent writer utility classes

These are similar to the FileWriter classes, but focus on writing to
extents within a file (or device) rather than writing a file in order.

Again there is a ExtentWriter interface from which all types of extent
writers interit.

There are also two basic extent writers: a direct extent writer that
writes data directly to the file descriptor, and a zero padding extent
writer that piggy-backs on another extent writer. When the
zero-padding extent writer is End()ed, it fills out the rest of the
extent with zeros.

Also, BzipExtentWriter: an ExtentWriter concrete subclass that writes
to another ExtentWriter.  BzipExtentWriter bzip2 decompresses all data
passed through.

Review URL: http://codereview.chromium.org/551132
diff --git a/SConstruct b/SConstruct
index d408cb7..38ae3f1 100644
--- a/SConstruct
+++ b/SConstruct
@@ -80,14 +80,16 @@
 
 if ARGUMENTS.get('debug', 0):
   env['CCFLAGS'] += ' -fprofile-arcs -ftest-coverage'
-  env['LIBS'] += ['gcov']
+  env['LIBS'] += ['bz2', 'gcov']
 
 
 
 sources = Split("""action_processor.cc
+                   bzip_extent_writer.cc
                    decompressing_file_writer.cc
                    delta_diff_parser.cc
                    download_action.cc
+                   extent_writer.cc
                    filesystem_copier_action.cc
                    filesystem_iterator.cc
                    file_writer.cc
@@ -107,9 +109,11 @@
 unittest_sources = Split("""action_unittest.cc
                             action_pipe_unittest.cc
                             action_processor_unittest.cc
+                            bzip_extent_writer_unittest.cc
                             decompressing_file_writer_unittest.cc
                             delta_diff_generator_unittest.cc
                             download_action_unittest.cc
+                            extent_writer_unittest.cc
                             file_writer_unittest.cc
                             filesystem_copier_action_unittest.cc
                             filesystem_iterator_unittest.cc