Refactor and document configurable options for BaseTest

* Support user-configurable test options in a common manner
* Document the currently supported options along with their default values
* The *caller* of `eraseTempDir` is now responsible for avoiding calls to the method if `PRESERVE_TEST_DIR` is true