SPARK-1032. If Yarn app fails before registering, app master stays around long after