tty: Factor out terminal setup into tty_cmd_handler.
* tty/pinentry-tty.c (terminal_save, terminal_restore): New. (terminal_setup): Rename from cbreak. (confirm, read_password): Don't touch terminal setting here. (tty_cmd_handler): Do terminal setting/restore here.
- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>