[SPARK-4813][Streaming] Fix the issue that ContextWaiter didn't handle 'spurious wakeup'

Used `Condition` to rewrite `ContextWaiter` because it provides a convenient API `awaitNanos` for timeout.
I suppose the documentation for the `SparkContext.awaitTermination(timeout)` could be improved to convey what happens when the timeout occurs...