Improve progress bar handling for backup / restore / image flash

The progress bar will now be updated during image backups, restores
and during image flashing (except for sparse images which will require
significant changes to libsparse, and except for mtd nand using

The progress bar will now be updated mid-file for file systems (tar) so
the user will see changes even during large file backup / restore.

Add a new progress tracking class to simplify handling of progress bar
updates. The class will only update the progress bar 5 times a second to
reduce the CPU load from updating the GUI frequently which does affect
backup times.

Change-Id: Iff382faef3df1f86604af336c1a8ce8993cd12c5
diff --git a/tarWrite.h b/tarWrite.h
index 498ca0a..a63a0f0 100644
--- a/tarWrite.h
+++ b/tarWrite.h
@@ -20,9 +20,12 @@
 void reinit_libtar_buffer();
-void init_libtar_buffer(unsigned new_buff_size);
+void init_libtar_buffer(unsigned new_buff_size, int pipe_fd);
 void free_libtar_buffer();
 writefunc_t write_libtar_buffer(int fd, const void *buffer, size_t size);
 void flush_libtar_buffer(int fd);
-#endif  // _TARWRITE_HEADER
\ No newline at end of file
+void init_libtar_no_buffer(int pipe_fd);
+writefunc_t write_libtar_no_buffer(int fd, const void *buffer, size_t size);
+#endif  // _TARWRITE_HEADER