Add a testing utility for pre-generating temp directories.
Add a testing utility for pre-generating temp directories.

This introduces `TestCase.precreate_tempdirs()`, which will pre-create
the specified number of temp directories, spy on `make_tempdir()` to
return them in order, and then immediately return them to the caller.

This allows unit tests to better work with code paths that make use of
`make_tempdir()`, ensuring the right results, and even pre-populating
files within them.

Testing Done:
Made use of this in unit tests for an in-development SCM.

Reviewed at https://reviews.reviewboard.org/r/12095/

reviewboard/rbtools,reviewboard/rbtools,reviewboard/rbtools