Move tmpdir creation logic into platform-specific files

Makes the logic testable, removes a hard to follow ifdef, and lets us get rid
of some redundant logic.

PiperOrigin-RevId: 303382036
diff --git a/src/main/cpp/archive_utils.h b/src/main/cpp/archive_utils.h
index 9410781..f970080 100644
--- a/src/main/cpp/archive_utils.h
+++ b/src/main/cpp/archive_utils.h
@@ -27,6 +27,7 @@
                               std::string *install_md5);
 
 // Extracts the embedded data files in `archive_path` into `output_dir`.
+// It's expected that `output_dir` already exists and that it's a directory.
 // Fails if `expected_install_md5` doesn't match that contained in the archive,
 // as this could indicate that the contents has unexpectedly changed.
 void ExtractArchiveOrDie(const std::string &archive_path,