test framework: parallel test runner sends terminate to formatter before printing to stdout

The parallel test runner now sends the terminate event to the formatter
(if there is one) after the parallel test runs but before dumping anything
to stdout/stderr at the end of the run.  This allows the existing
stdout/stderr summary reporting to co-exist nicely with a formatter like
the test_results.Curses that otherwise clobbers the screen.

llvm-svn: 248228
diff --git a/lldb/test/dosep.py b/lldb/test/dosep.py
index d666fdb..4af748d 100755
--- a/lldb/test/dosep.py
+++ b/lldb/test/dosep.py
@@ -1231,6 +1231,11 @@
     (timed_out, passed, failed, unexpected_successes, pass_count,
      fail_count) = summary_results
 
+    # The results formatter - if present - is done now.  Tell it to
+    # terminate.
+    if results_formatter is not None:
+        results_formatter.send_terminate_as_needed()
+
     timed_out = set(timed_out)
     num_test_files = len(passed) + len(failed)
     num_test_cases = pass_count + fail_count