libtar: Add methods for in-memory files

 * tar_append_file_contents: append header and buffer, similar to
   tar_append_file.

 * tar_append_buffer: append buffer only, similar to
   tar_append_regfile.

 * tar_extract_file_contents: extract regfile contents to buffer,
   similar to tar_extract_regfile.

Change-Id: Ie7c788b684873035fb3505459db002962d0d4a48