kernel: Do not fail when setting thread ID to the current value
vkernel{,64}: Save and restore termios attributes