tty: properly check character position when handling IUTF8 backspaces
The tty_rubchar() code handling backspaces for UTF-8 characters didn't
properly check whether the beginning of the current line was reached.
This resulted in a kernel panic in ttyinq_unputchar() when prodded with
certain malformed UTF-8 sequences.
PR: 275009
Reviewed by: christos
Differential Revision: https://reviews.freebsd.org/D42564
Approved by: so
Security: FreeBSD-EN-23:21.tty
(cherry picked from commit c6d7be214811c315d234d64c6cbaa92d4f55d2c1)
(cherry picked from commit ae8387cc818a0d6a2229ee049b671482e1549519)