[gdb/testsuite] Move setting of Term::_last_char to Term::_insert

The variable Term::_last_char is meant to represent the last char inserted by
Term::_insert, but setting it is done alongside the only call to _insert in
lib/tuiterm.exp:
...
		_insert $expect_out(0,string)
		variable _last_char
		set _last_char [string index $expect_out(0,string) end]
...

Fix this by moving the setting of _last_char to inside _insert.

Tested on x86_64-linux.
2 files changed