patch 8.2.3624: when renaming a terminal buffer status text is not updated

Problem:    When renaming a terminal buffer the status text is not updated.
Solution:   Clear the cached status text when renaming a terminal buffer.
            (closes #9162)
diff --git a/src/buffer.c b/src/buffer.c
index 29cfb8a..2983ca9 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -3453,6 +3453,11 @@
     if (buf->b_ml.ml_mfp != NULL)
 	ml_setname(buf);
 
+#ifdef FEAT_TERMINAL
+    if (buf->b_term != NULL)
+	term_clear_status_text(buf->b_term);
+#endif
+
     if (curwin->w_buffer == buf)
 	check_arg_idx(curwin);	// check file name for arg list
 #ifdef FEAT_TITLE