read_key_sequence: correct the handling of raw_keybuf in recursive calls
This fixes bug #29349.
* src/keyboard.c (raw_keybuf_buffer, raw_keybuf_count_buffer): New variables
pointed to by ...
(raw_keybuf, raw_keybuf_count): Variables converted to pointers.
(GROW_RAW_KEYBUF): enhance with a length argument.
(command_loop_1): Initialize the above two pointers to their canonical values.
(read_key_sequence): In recursive calls (for menus) the function was
overwriting the raw event buffer of the outer call. Correct this by
introducing a local buffer for each level of call, and setting this up to be
used by the call to read_char. Any contents of this local buffer are appended
to the global buffer afterwards.