test defs: test directory creation more configurable
After this change, the individual tests will be able to tell
`./defs' whether or not to create a temporary test directory
for them, and if yes, whether or not to pre-populate it.
* tests/defs: Only create the temporary test directory if the
variable `$am_create_testdir' is not set to "no". In this
case, only pre-populate it if that variable is not set to
`$empty'.
* tests/defs-static.in: Check that `$am_create_testdir' is not
exported in the environment.
* tests/self-check-env-sanitize.test: Update.
* tests/self-check-dir.test: Extend, and make deeper and more
robust.
* tests/README (Section "Writing test cases" subsection "Do"):
Update.
* tests/autodist.test: Set `$am_create_testdir' instead of
removing by hand files created by ./defs.
* tests/tap-doc2.test: Likewise.