We move the code for creating the temporary directory to sage.misc.temporary_file, removing the dependency on sage.misc.misc and sage.misc.lazy_string.
This is preparation for #29941, allowing us to keep sage.misc.misc out of sagemath-objects and sagemath-repl; sage.misc.temporary_file goes into sagemath-environment.
CC: @orlitzky @kiwifb
Component: refactoring
Branch/Commit: u/mkoeppe/sage_misc_temporary_file__move_sage_tmp_implementation_here @ 8c4d015
Issue created by migration from https://trac.sagemath.org/ticket/32986