[SPARK-4826] Fix generation of temp file names in WAL tests

This PR is another approach for fixing SPARK-4826, an issue where a bug in how we generate temp. file names was causing spurious test failures in the write ahead log suites.

Closes #3695.
Closes #3701.
This might look race prone (deleting a file and hoping that someone else won't come along and write it in the meantime), but it should be safe because:

1. Different Jenkins builds will have different temp directories (`dir`).
2. Within a JVM, multiple calls to `createTempFile` will never return the same pathname ([see Javadoc](http://docs.oracle.com/javase/7/docs/api/java/io/File.html#createTempFile(java.lang.String,%20java.lang.String,%20java.io.File))).