SPARK-2113: awaitTermination() after stop() will hang in Spark Stremaing

Author: Lars Albertsson <lalle@spotify.com>

Closes #1001 from lallea/contextwaiter_stopped and squashes the following commits:

93cd314 [Lars Albertsson] Mend StreamingContext stop() followed by awaitTermination().
(cherry picked from commit 4d5c12aa1c54c49377a4bafe3bcc4993d5e1a552)

Signed-off-by: Patrick Wendell <pwendell@gmail.com>