Refactor archive_read_extract

The initialisation of the archive_write_disk object and the call to
archive_write_disk_set_standard_lookup are only needed in the
archive_read_extract function, not in archive_read_extract2 or other related
functions. Therefore this initialisation is merged into archive_read_extract.

The static function get_extract is renamed to __archive_read_get_extract so that
is can be made non-static. The struct extract is renamed to archive_read_extract
so that it can be placed in a header file without risk of namespace clashes.
Both these declarations are then moved to the archive_read_private.h header.
This preparation is necessary so that the contents of archive_read_extract.c can
be split between two source files.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Split archive_read_extract2 from archive_read_extract

The function archive_read_extract requires a call to
archive_write_disk_set_standard_lookup but the functions archive_read_extract2
and archive_read_extract_set_progress_callback do not. Therefore, the latter
pair of functions, the internal function __archive_read_get_extract and the
static function copy_data are moved out of archive_read_extract.c into the new
file archive_read_extract2.c.

This ensures that when statically linking, the standard user and group lookup
functions will not be linked into a program unless they are really needed.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Merge pull request #71 from betafive/pbarker/extract

Split archive_read_extract.c into two source files