[SPARK-1600] Refactor FileInputStream tests to remove Thread.sleep() calls and SystemClock usage

This PR refactors Spark Streaming's FileInputStream tests to remove uses of Thread.sleep() and SystemClock, which should hopefully resolve some longstanding flakiness in these tests (see SPARK-1600).

Key changes:

- Modify FileInputDStream to use the scheduler's Clock instead of System.currentTimeMillis(); this allows it to be tested using ManualClock.
- Fix a synchronization issue in ManualClock's `currentTime` method.
- Add a StreamingTestWaiter class which allows callers to block until a certain number of batches have finished.
- Change the FileInputStream tests so that files' modification times are manually set based off of ManualClock; this eliminates many Thread.sleep calls.
- Update these tests to use the withStreamingContext fixture.
I think that there was a bug here in the old tests: here, this is the `outputStream` from the stopped SparkContext, not the restarted one.  The new tests' use of the `withSparkContext` fixture reduces the scope of these variables and prevents this type of error.