patch 8.0.0728: the terminal structure is never freed

Problem:    The terminal structure is never freed.
Solution:   Free the structure and unreference what it contains.
diff --git a/src/proto/channel.pro b/src/proto/channel.pro
index 6c845ca..e576584 100644
--- a/src/proto/channel.pro
+++ b/src/proto/channel.pro
@@ -67,5 +67,5 @@
 job_T *job_start(typval_T *argvars, jobopt_T *opt_arg);
 char *job_status(job_T *job);
 void job_info(job_T *job, dict_T *dict);
-int job_stop(job_T *job, typval_T *argvars);
+int job_stop(job_T *job, typval_T *argvars, char *type);
 /* vim: set ft=c : */
diff --git a/src/proto/terminal.pro b/src/proto/terminal.pro
index e89b0a2..58eb77f 100644
--- a/src/proto/terminal.pro
+++ b/src/proto/terminal.pro
@@ -1,5 +1,6 @@
 /* terminal.c */
 void ex_terminal(exarg_T *eap);
+void free_terminal(term_T *term);
 void write_to_term(buf_T *buffer, char_u *msg, channel_T *channel);
 void term_update_window(win_T *wp);
 void terminal_loop(void);