[SPARK-4026][Streaming] Write ahead log management

As part of the effort to avoid data loss on Spark Streaming driver failure, we want to implement a write ahead log that can write received data to HDFS. This allows the received data to be persist across driver failures. So when the streaming driver is restarted, it can find and reprocess all the data that were received but not processed.

This was primarily implemented by @harishreedharan. This is still WIP, as he is going to improve the unitests by using HDFS mini cluster.
Minor nitpick, but it looks like the tests use a few different techniques for creating files in the temp directory:

- `val file = new File(tempDirectory, Random.nextString(10))`
- `val file = File.createTempFile("TestSequentialReads", "", tempDirectory)`
- `val file = new File(tempDirectory, "TestWriter")`

For consistency, we should pick one method.