[gdb/cli] Handle pending ^C after rl_callback_read_char for readline 7