libtar: Various bug fixes and enhancements

 * Fix compiler warnings
 * Fix memory leaks
 * Fix potential buffer overflows
 * Fix selinux context for symlinks
 * Fix off-by-one in gnu/ustar filename storage
 * Cleanup dead code
 * Add support for numeric-only uid/gid

Change-Id: If4daa7222b5c4f0e0741e7a3003fbf98fd60a872
libtar: Fix hardlink extract

Do unlink for hardlink extract just as symlink does.  Failure to unlink
causes extract failures when the target exists.

Change-Id: Iba73206221a27078154e201f0cbdf7644df94170
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