[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.
In hindsight, my modeling of awaitTermination against Akka [ActorSystem](http://doc.akka.io/api/akka/2.0/akka/actor/ActorSystem.html)'s awaitTermination (which return Unit) was the wrong idea. I should have done it like Java ExecutorService's awaitTermination which returns a Boolean. Now its not possible to change the API without breaking compatiblity. :(