inspect: Cache downloaded files in the handle g->tmpdir.
During inspection we download various files such as the Windows
'software' and 'system' registries. Previously these were downloaded
as temporary files and discarded immediately after use. This meant
that the 'software' registry was being downloaded twice by
virt-inspector (it's required once for basic OS inspection, and a
second time to list Windows applications).
This commit changes this so that these files are cached in g->tmpdir,
and thus the second time we just reuse the file we've already
downloaded.
Callers shouldn't be relying on inspect-list-applications to reread
the actual registry from the VM (unless you close and reopen the
handle). It says in the documentation that the results of inspection
may be cached in the handle.