Method::print_fd_arg_list: keep track of position in flattened sequence
For the templated interface, the arguments of any callbacks
are spliced into the list of arguments.
If the callback is the last argument (aside from
the corresponding user pointer), then the splicing can be performed
purely locally. However, if a callback appears in any other position
(in particular, if there are multiple callbacks), then the splicing
needs to be taken into account for any further arguments.
Let Method::print_fd_arg_list take care of the accounting.
Most callers ignore the extra argument to the Method::print_fd_arg_list
callback. Only cpp_generator::class_printer::print_method_header
needs to know the position in the flattened list of arguments
because it needs to pass this position to the type printer.
Signed-off-by: Sven Verdoolaege <sven@cerebras.net>