Add new listener event for thread dumps.
Fix test code in DAGSchedulerSuite.