patch 8.1.1437: code to handle callbacks is duplicated

Problem:    Code to handle callbacks is duplicated.
Solution:   Add callback_T and functions to deal with it.
diff --git a/src/proto/channel.pro b/src/proto/channel.pro
index 0f5b655..4184eef 100644
--- a/src/proto/channel.pro
+++ b/src/proto/channel.pro
@@ -12,7 +12,7 @@
 void channel_set_pipes(channel_T *channel, sock_T in, sock_T out, sock_T err);
 void channel_set_job(channel_T *channel, job_T *job, jobopt_T *options);
 void channel_set_options(channel_T *channel, jobopt_T *opt);
-void channel_set_req_callback(channel_T *channel, ch_part_T part, char_u *callback, partial_T *partial, int id);
+void channel_set_req_callback(channel_T *channel, ch_part_T part, callback_T *callback, int id);
 void channel_buffer_free(buf_T *buf);
 void channel_write_any_lines(void);
 void channel_write_new_lines(buf_T *buf);
diff --git a/src/proto/evalfunc.pro b/src/proto/evalfunc.pro
index 5a53136..533b982 100644
--- a/src/proto/evalfunc.pro
+++ b/src/proto/evalfunc.pro
@@ -11,6 +11,8 @@
 float_T vim_round(float_T f);
 long do_searchpair(char_u *spat, char_u *mpat, char_u *epat, int dir, typval_T *skip, int flags, pos_T *match_pos, linenr_T lnum_stop, long time_limit);
 void f_string(typval_T *argvars, typval_T *rettv);
-char_u *get_callback(typval_T *arg, partial_T **pp);
-void free_callback(char_u *callback, partial_T *partial);
+callback_T get_callback(typval_T *arg);
+void put_callback(callback_T *cb, typval_T *tv);
+void set_callback(callback_T *dest, callback_T *src);
+void free_callback(callback_T *callback);
 /* vim: set ft=c : */
diff --git a/src/proto/userfunc.pro b/src/proto/userfunc.pro
index 25f1c3c..62babf3 100644
--- a/src/proto/userfunc.pro
+++ b/src/proto/userfunc.pro
@@ -8,6 +8,7 @@
 void restore_funccal(void);
 void free_all_functions(void);
 int func_call(char_u *name, typval_T *args, partial_T *partial, dict_T *selfdict, typval_T *rettv);
+int call_callback(callback_T *callback, int len, typval_T *rettv, int argcount, typval_T *argvars, int (*argv_func)(int, typval_T *, int), linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, dict_T *selfdict);
 int call_func(char_u *funcname, int len, typval_T *rettv, int argcount_in, typval_T *argvars_in, int (*argv_func)(int, typval_T *, int), linenr_T firstline, linenr_T lastline, int *doesrange, int evaluate, partial_T *partial, dict_T *selfdict_in);
 char_u *trans_function_name(char_u **pp, int skip, int flags, funcdict_T *fdp, partial_T **partial);
 void ex_function(exarg_T *eap);