patch 8.2.1498: on slow systems tests can be flaky

Problem:    On slow systems tests can be flaky.
Solution:   Use TermWait() instead of term-wait(). (Yegappan Lakshmanan,
            closes #6756)
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim
index 982b464..17eba9c 100644
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -264,11 +264,11 @@
   let width = &columns
   botright vert term
   let buf = bufnr('$')
-  call term_wait(buf, 100)
+  call TermWait(buf, 100)
   exe "set columns=" .. (width / 2)
   redraw
   call term_sendkeys(buf, "キ")
-  call term_wait(buf, 10)
+  call TermWait(buf, 10)
   exe "set columns=" .. width
   exe buf . 'bwipe!'
 endfunc
@@ -1221,7 +1221,7 @@
   CheckRunVimInTerminal
   call assert_fails("call term_dumpwrite({}, 'Xtest.dump')", 'E728:')
   let buf = RunVimInTerminal('', {})
-  call term_wait(buf)
+  call TermWait(buf)
   call assert_fails("call term_dumpwrite(buf, 'Xtest.dump', '')", 'E715:')
   call assert_fails("call term_dumpwrite(buf, [])", 'E730:')
   call writefile([], 'Xtest.dump')
@@ -1231,7 +1231,7 @@
   call assert_fails("call term_dumpwrite(buf, test_null_string())", 'E482:')
   call test_garbagecollect_now()
   call StopVimInTerminal(buf)
-  call term_wait(buf)
+  call TermWait(buf)
   call assert_fails("call term_dumpwrite(buf, 'Xtest.dump')", 'E958:')
   call assert_fails('call term_sendkeys([], ":q\<CR>")', 'E745:')
   call assert_equal(0, term_sendkeys(buf, ":q\<CR>"))