agetty: fix erasure of escape sequences and tab characters
When escape sequences (like arrow keys) or tab characters are entered
at the login prompt, they are properly visualized but only partially
erasable with backspace. This is because the erase logic assumes each
stored character corresponds to one visual character, but escape
sequences display as "^[" (2 chars) and tabs expand to multiple spaces.
Track visual character width for each stored byte in a parallel array.
When erasing, use the stored visual width to properly erase all
displayed characters for that input byte.
Fixes: https://github.com/util-linux/util-linux/issues/3624 Signed-off-by: Karel Zak <kzak@redhat.com>