[SPARK-4631] unit test for MQTT

Please review the unit test for MQTT
This can cause the SparkContext to be not shutdown if there is an exception in the unit test, causing a leaked SparkContext. Take a look at how it is done in the KafkaStreamSuite with BeforeAndAfter.