patch 8.0.0957: a terminal job can deadlock when sending many keys

Problem:    When term_sendkeys() sends many keys it may get stuck in writing
            to the job.
Solution:   Make the write non-blocking, buffer keys to be sent.
diff --git a/src/terminal.c b/src/terminal.c
index 5878db7..e8e187b 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -400,6 +400,10 @@
 	vterm_get_size(term->tl_vterm, &term->tl_rows, &term->tl_cols);
 	term_report_winsize(term, term->tl_rows, term->tl_cols);
 
+	/* Make sure we don't get stuck on sending keys to the job, it leads to
+	 * a deadlock if the job is waiting for Vim to read. */
+	channel_set_nonblock(term->tl_job->jv_channel, PART_IN);
+
 	if (old_curbuf != NULL)
 	{
 	    --curbuf->b_nwindows;